aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduke2906 <philipp.prangenberg@gmail.com>2016-09-26 15:09:20 +0200
committerGitHub <noreply@github.com>2016-09-26 15:09:20 +0200
commit960bf899414d89221e92138fdb98777c3f4f73ec (patch)
tree87f5fd96185aa5f2fff0f84e2e2fa8be379ee837
parent0d3c05a24992eeeba02032e474d3a9bbb3239f10 (diff)
parentaaec58aec04256845dc37afd713b488071b1406b (diff)
downloadtrackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.tar.gz
trackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.tar.bz2
trackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.zip
Merge pull request #1 from tananaev/master
Update Changes, including version 3.7
-rw-r--r--LICENSE.txt202
-rw-r--r--debug.xml26
-rw-r--r--pom.xml15
-rw-r--r--schema/changelog-3.7.xml2
-rw-r--r--schema/changelog-3.8.xml43
-rw-r--r--schema/changelog-master.xml1
-rwxr-xr-xsetup/package.sh175
-rw-r--r--setup/traccar.iss51
-rw-r--r--setup/traccar.xml (renamed from setup/unix/traccar.xml)19
-rwxr-xr-xsetup/unix/linux-arm-setup.sh22
-rwxr-xr-xsetup/unix/setup.sh19
-rw-r--r--setup/windows/traccar.iss90
-rw-r--r--setup/windows/traccar.xml396
-rw-r--r--src/org/traccar/BasePipelineFactory.java2
-rw-r--r--src/org/traccar/Context.java16
-rw-r--r--src/org/traccar/api/resource/AttributeAliasResource.java90
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java1
-rw-r--r--src/org/traccar/database/AliasesManager.java113
-rw-r--r--src/org/traccar/database/DataManager.java26
-rw-r--r--src/org/traccar/database/DeviceManager.java92
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java7
-rw-r--r--src/org/traccar/helper/ObdDecoder.java37
-rw-r--r--src/org/traccar/helper/PatternUtil.java26
-rw-r--r--src/org/traccar/model/AttributeAlias.java61
-rw-r--r--src/org/traccar/model/Position.java2
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java16
-rw-r--r--src/org/traccar/protocol/AdmProtocol.java2
-rw-r--r--src/org/traccar/protocol/ApelProtocol.java2
-rw-r--r--src/org/traccar/protocol/AplicomProtocol.java2
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java298
-rwxr-xr-xsrc/org/traccar/protocol/AppelloProtocol.java2
-rw-r--r--src/org/traccar/protocol/AquilaProtocol.java2
-rw-r--r--src/org/traccar/protocol/Ardi01Protocol.java2
-rw-r--r--src/org/traccar/protocol/ArknavProtocol.java2
-rw-r--r--src/org/traccar/protocol/ArknavX8Protocol.java47
-rw-r--r--src/org/traccar/protocol/ArknavX8ProtocolDecoder.java92
-rw-r--r--src/org/traccar/protocol/ArnaviProtocol.java2
-rw-r--r--src/org/traccar/protocol/AstraProtocol.java4
-rw-r--r--src/org/traccar/protocol/AstraProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/AtrackProtocol.java4
-rw-r--r--src/org/traccar/protocol/AuroProtocol.java2
-rw-r--r--src/org/traccar/protocol/AutoFonProtocol.java2
-rw-r--r--src/org/traccar/protocol/AutoGradeProtocol.java47
-rw-r--r--src/org/traccar/protocol/AutoGradeProtocolDecoder.java102
-rw-r--r--src/org/traccar/protocol/Avl301Protocol.java2
-rw-r--r--src/org/traccar/protocol/BceProtocol.java2
-rw-r--r--src/org/traccar/protocol/BlackKiteProtocol.java2
-rw-r--r--src/org/traccar/protocol/BoxProtocol.java2
-rw-r--r--src/org/traccar/protocol/CalAmpProtocol.java2
-rw-r--r--src/org/traccar/protocol/CarTrackProtocol.java2
-rw-r--r--src/org/traccar/protocol/CarcellProtocol.java2
-rw-r--r--src/org/traccar/protocol/CarscopProtocol.java2
-rw-r--r--src/org/traccar/protocol/CastelProtocol.java4
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java143
-rw-r--r--src/org/traccar/protocol/CellocatorProtocol.java12
-rw-r--r--src/org/traccar/protocol/CguardProtocol.java47
-rw-r--r--src/org/traccar/protocol/CguardProtocolDecoder.java91
-rw-r--r--src/org/traccar/protocol/CityeasyProtocol.java2
-rw-r--r--src/org/traccar/protocol/CradlepointProtocol.java2
-rw-r--r--src/org/traccar/protocol/DishaProtocol.java2
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocol.java2
-rw-r--r--src/org/traccar/protocol/EelinkProtocol.java2
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java54
-rw-r--r--src/org/traccar/protocol/EnforaProtocol.java2
-rw-r--r--src/org/traccar/protocol/FlextrackProtocol.java2
-rw-r--r--src/org/traccar/protocol/FoxProtocol.java2
-rw-r--r--src/org/traccar/protocol/FreedomProtocol.java2
-rw-r--r--src/org/traccar/protocol/GalileoProtocol.java2
-rw-r--r--src/org/traccar/protocol/GatorProtocol.java4
-rw-r--r--src/org/traccar/protocol/Gl100Protocol.java4
-rw-r--r--src/org/traccar/protocol/Gl200Protocol.java4
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocol.java2
-rw-r--r--src/org/traccar/protocol/GnxProtocol.java2
-rw-r--r--src/org/traccar/protocol/GnxProtocolDecoder.java19
-rw-r--r--src/org/traccar/protocol/GoSafeProtocol.java2
-rw-r--r--src/org/traccar/protocol/GotopProtocol.java2
-rw-r--r--src/org/traccar/protocol/Gps103Protocol.java4
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java38
-rw-r--r--src/org/traccar/protocol/GpsGateProtocol.java2
-rw-r--r--src/org/traccar/protocol/GpsMarkerProtocol.java2
-rw-r--r--src/org/traccar/protocol/GpsmtaProtocol.java2
-rw-r--r--src/org/traccar/protocol/GranitProtocol.java2
-rw-r--r--src/org/traccar/protocol/GranitProtocolEncoder.java24
-rw-r--r--src/org/traccar/protocol/Gt02Protocol.java2
-rw-r--r--src/org/traccar/protocol/Gt06Protocol.java2
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java38
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java16
-rw-r--r--src/org/traccar/protocol/H02FrameDecoder.java12
-rw-r--r--src/org/traccar/protocol/H02Protocol.java8
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java22
-rw-r--r--src/org/traccar/protocol/HaicomProtocol.java2
-rw-r--r--src/org/traccar/protocol/HomtecsProtocol.java2
-rw-r--r--src/org/traccar/protocol/HuaShengProtocol.java2
-rw-r--r--src/org/traccar/protocol/HuabaoProtocol.java2
-rw-r--r--src/org/traccar/protocol/HunterProProtocol.java2
-rw-r--r--src/org/traccar/protocol/IdplProtocol.java2
-rw-r--r--src/org/traccar/protocol/IntellitracProtocol.java2
-rw-r--r--src/org/traccar/protocol/JpKorjarFrameDecoder.java46
-rw-r--r--src/org/traccar/protocol/JpKorjarProtocol.java45
-rw-r--r--src/org/traccar/protocol/JpKorjarProtocolDecoder.java93
-rw-r--r--src/org/traccar/protocol/Jt600Protocol.java2
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java90
-rw-r--r--src/org/traccar/protocol/KhdProtocol.java2
-rw-r--r--src/org/traccar/protocol/L100Protocol.java2
-rw-r--r--src/org/traccar/protocol/LaipacProtocol.java2
-rw-r--r--src/org/traccar/protocol/M2mProtocol.java2
-rw-r--r--src/org/traccar/protocol/ManPowerProtocol.java2
-rw-r--r--src/org/traccar/protocol/MegastekProtocol.java2
-rw-r--r--src/org/traccar/protocol/MegastekProtocolDecoder.java50
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocol.java4
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java272
-rw-r--r--src/org/traccar/protocol/MeitrackProtocol.java4
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocol.java2
-rw-r--r--src/org/traccar/protocol/Mta6Protocol.java2
-rw-r--r--src/org/traccar/protocol/MtxProtocol.java2
-rw-r--r--src/org/traccar/protocol/MxtProtocol.java2
-rw-r--r--src/org/traccar/protocol/NavigilProtocol.java2
-rw-r--r--src/org/traccar/protocol/NavisProtocol.java2
-rw-r--r--src/org/traccar/protocol/NoranProtocol.java2
-rw-r--r--src/org/traccar/protocol/NoranProtocolDecoder.java28
-rw-r--r--src/org/traccar/protocol/NvsProtocol.java2
-rw-r--r--src/org/traccar/protocol/ObdDongleProtocol.java2
-rw-r--r--src/org/traccar/protocol/OigoProtocol.java41
-rw-r--r--src/org/traccar/protocol/OigoProtocolDecoder.java157
-rw-r--r--src/org/traccar/protocol/OrionProtocol.java2
-rw-r--r--src/org/traccar/protocol/OsmAndProtocol.java2
-rw-r--r--src/org/traccar/protocol/PathAwayProtocol.java2
-rw-r--r--src/org/traccar/protocol/PiligrimProtocol.java2
-rw-r--r--src/org/traccar/protocol/ProgressProtocol.java2
-rw-r--r--src/org/traccar/protocol/Pt3000Protocol.java2
-rw-r--r--src/org/traccar/protocol/Pt502Protocol.java2
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java6
-rw-r--r--src/org/traccar/protocol/RaveonProtocol.java2
-rw-r--r--src/org/traccar/protocol/RitiProtocol.java2
-rw-r--r--src/org/traccar/protocol/RuptelaProtocol.java2
-rw-r--r--src/org/traccar/protocol/SanavProtocol.java2
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocol.java2
-rw-r--r--src/org/traccar/protocol/Stl060Protocol.java2
-rw-r--r--src/org/traccar/protocol/SuntechProtocol.java2
-rwxr-xr-xsrc/org/traccar/protocol/SupermateProtocol.java2
-rw-r--r--src/org/traccar/protocol/T55Protocol.java4
-rw-r--r--src/org/traccar/protocol/T800xProtocolDecoder.java26
-rw-r--r--src/org/traccar/protocol/TaipProtocol.java4
-rw-r--r--src/org/traccar/protocol/TelicProtocol.java2
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocol.java4
-rw-r--r--src/org/traccar/protocol/ThinkRaceProtocol.java2
-rw-r--r--src/org/traccar/protocol/Tk102Protocol.java2
-rw-r--r--src/org/traccar/protocol/Tk103Protocol.java4
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java42
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocol.java2
-rw-r--r--src/org/traccar/protocol/TopflytechProtocol.java2
-rw-r--r--src/org/traccar/protocol/TotemProtocol.java2
-rw-r--r--src/org/traccar/protocol/TotemProtocolDecoder.java24
-rw-r--r--src/org/traccar/protocol/Tr20Protocol.java2
-rw-r--r--src/org/traccar/protocol/TrackboxProtocol.java2
-rw-r--r--src/org/traccar/protocol/TramigoProtocol.java2
-rw-r--r--src/org/traccar/protocol/TrvProtocol.java2
-rw-r--r--src/org/traccar/protocol/Tt8850Protocol.java2
-rw-r--r--src/org/traccar/protocol/TytanProtocol.java2
-rw-r--r--src/org/traccar/protocol/TzoneProtocol.java2
-rw-r--r--src/org/traccar/protocol/TzoneProtocolDecoder.java24
-rw-r--r--src/org/traccar/protocol/UlbotechProtocol.java2
-rw-r--r--src/org/traccar/protocol/UproProtocol.java2
-rw-r--r--src/org/traccar/protocol/V680Protocol.java4
-rw-r--r--src/org/traccar/protocol/VisiontekProtocol.java2
-rw-r--r--src/org/traccar/protocol/WatchProtocol.java2
-rw-r--r--src/org/traccar/protocol/WatchProtocolDecoder.java13
-rw-r--r--src/org/traccar/protocol/WialonProtocol.java2
-rw-r--r--src/org/traccar/protocol/WialonProtocolEncoder.java22
-rw-r--r--src/org/traccar/protocol/WondexProtocol.java4
-rw-r--r--src/org/traccar/protocol/WondexProtocolEncoder.java18
-rw-r--r--src/org/traccar/protocol/XexunProtocol.java2
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java22
-rw-r--r--src/org/traccar/protocol/XirgoProtocol.java4
-rw-r--r--src/org/traccar/protocol/Xt013Protocol.java2
-rw-r--r--src/org/traccar/protocol/YwtProtocol.java2
-rw-r--r--src/org/traccar/reports/ReportUtils.java16
-rw-r--r--src/org/traccar/reports/Summary.java6
-rw-r--r--src/org/traccar/reports/Trips.java7
-rw-r--r--src/org/traccar/web/CsvBuilder.java11
-rw-r--r--src/org/traccar/web/WebServer.java3
-rw-r--r--test/org/traccar/helper/PatternUtilTest.java2
-rw-r--r--test/org/traccar/protocol/AplicomProtocolDecoderTest.java20
-rw-r--r--test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java39
-rw-r--r--test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java18
-rw-r--r--test/org/traccar/protocol/CastelProtocolDecoderTest.java22
-rw-r--r--test/org/traccar/protocol/CguardProtocolDecoderTest.java54
-rw-r--r--test/org/traccar/protocol/GoSafeProtocolDecoderTest.java9
-rw-r--r--test/org/traccar/protocol/H02FrameDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/H02ProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java24
-rw-r--r--test/org/traccar/protocol/Jt600ProtocolDecoderTest.java38
-rw-r--r--test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/NoranProtocolDecoderTest.java6
-rw-r--r--test/org/traccar/protocol/OigoProtocolDecoderTest.java24
-rw-r--r--test/org/traccar/protocol/TramigoProtocolDecoderTest.java22
-rw-r--r--test/org/traccar/protocol/WatchProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/XexunProtocolDecoderTest.java4
-rwxr-xr-xtools/hex.sh20
-rw-r--r--tools/minify.bat5
-rwxr-xr-xtools/minify.sh14
-rwxr-xr-xtools/translate.py35
l---------web1
-rw-r--r--web/.jscsrc5
-rw-r--r--web/.jshintignore4
-rw-r--r--web/.jshintrc75
-rw-r--r--web/app.css69
-rw-r--r--web/app.js20
-rw-r--r--web/app/Application.js117
-rw-r--r--web/app/AttributeFormatter.js81
-rw-r--r--web/app/GeofenceConverter.js79
-rw-r--r--web/app/Style.js79
-rw-r--r--web/app/controller/Root.js207
-rw-r--r--web/app/model/Attribute.js30
-rw-r--r--web/app/model/Command.js30
-rw-r--r--web/app/model/Device.js45
-rw-r--r--web/app/model/Event.js43
-rw-r--r--web/app/model/Geofence.js36
-rw-r--r--web/app/model/Group.js33
-rw-r--r--web/app/model/Notification.js33
-rw-r--r--web/app/model/Position.js66
-rw-r--r--web/app/model/ReportSummary.js41
-rw-r--r--web/app/model/ReportTrip.js55
-rw-r--r--web/app/model/Server.js72
-rw-r--r--web/app/model/User.js69
-rw-r--r--web/app/store/AllDevices.js28
-rw-r--r--web/app/store/AllGeofences.js28
-rw-r--r--web/app/store/AllGroups.js28
-rw-r--r--web/app/store/AllNotifications.js30
-rw-r--r--web/app/store/Attributes.js24
-rw-r--r--web/app/store/CommandTypes.js50
-rw-r--r--web/app/store/Devices.js28
-rw-r--r--web/app/store/DistanceUnits.js39
-rw-r--r--web/app/store/Events.js25
-rw-r--r--web/app/store/GeofenceTypes.js28
-rw-r--r--web/app/store/Geofences.js28
-rw-r--r--web/app/store/Groups.js28
-rw-r--r--web/app/store/Languages.js33
-rw-r--r--web/app/store/LatestPositions.js20
-rw-r--r--web/app/store/MapTypes.js34
-rw-r--r--web/app/store/Notifications.js25
-rw-r--r--web/app/store/Positions.js25
-rw-r--r--web/app/store/ReportEventTypes.js25
-rw-r--r--web/app/store/ReportEvents.js28
-rw-r--r--web/app/store/ReportRoute.js28
-rw-r--r--web/app/store/ReportSummary.js29
-rw-r--r--web/app/store/ReportTrips.js29
-rw-r--r--web/app/store/ReportTypes.js34
-rw-r--r--web/app/store/SpeedUnits.js43
-rw-r--r--web/app/store/TimeUnits.js31
-rw-r--r--web/app/store/Users.js28
-rw-r--r--web/app/view/AttributeController.js42
-rw-r--r--web/app/view/AttributeDialog.js47
-rw-r--r--web/app/view/Attributes.js47
-rw-r--r--web/app/view/AttributesController.js114
-rw-r--r--web/app/view/BaseDialog.js23
-rw-r--r--web/app/view/BaseEditDialog.js32
-rw-r--r--web/app/view/BaseEditDialogController.js60
-rw-r--r--web/app/view/BaseMap.js117
-rw-r--r--web/app/view/BasePermissionsController.js81
-rw-r--r--web/app/view/BaseWindow.js24
-rw-r--r--web/app/view/CommandDialog.js107
-rw-r--r--web/app/view/CommandDialogController.js103
-rw-r--r--web/app/view/CustomTimeField.js29
-rw-r--r--web/app/view/DeviceDialog.js49
-rw-r--r--web/app/view/DeviceGeofences.js43
-rw-r--r--web/app/view/Devices.js176
-rw-r--r--web/app/view/DevicesController.js156
-rw-r--r--web/app/view/EditToolbar.js48
-rw-r--r--web/app/view/GeofenceDialog.js58
-rw-r--r--web/app/view/GeofenceDialogController.js51
-rw-r--r--web/app/view/GeofenceMap.js116
-rw-r--r--web/app/view/GeofenceMapController.js43
-rw-r--r--web/app/view/Geofences.js48
-rw-r--r--web/app/view/GeofencesController.js72
-rw-r--r--web/app/view/GroupDialog.js44
-rw-r--r--web/app/view/GroupGeofences.js43
-rw-r--r--web/app/view/Groups.js53
-rw-r--r--web/app/view/GroupsController.js88
-rw-r--r--web/app/view/Login.js99
-rw-r--r--web/app/view/LoginController.js109
-rw-r--r--web/app/view/Main.js67
-rw-r--r--web/app/view/MainMobile.js52
-rw-r--r--web/app/view/Map.js59
-rw-r--r--web/app/view/MapController.js308
-rw-r--r--web/app/view/Notifications.js71
-rw-r--r--web/app/view/NotificationsController.js84
-rw-r--r--web/app/view/Register.js60
-rw-r--r--web/app/view/RegisterController.js43
-rw-r--r--web/app/view/Report.js63
-rw-r--r--web/app/view/ReportConfigController.js69
-rw-r--r--web/app/view/ReportConfigDialog.js98
-rw-r--r--web/app/view/ReportController.js343
-rw-r--r--web/app/view/ServerDialog.js89
-rw-r--r--web/app/view/SettingsMenu.js64
-rw-r--r--web/app/view/SettingsMenuController.js104
-rw-r--r--web/app/view/State.js45
-rw-r--r--web/app/view/StateController.js131
-rw-r--r--web/app/view/UserDevices.js47
-rw-r--r--web/app/view/UserDialog.js93
-rw-r--r--web/app/view/UserDialogController.js48
-rw-r--r--web/app/view/UserGeofences.js43
-rw-r--r--web/app/view/UserGroups.js43
-rw-r--r--web/app/view/Users.js73
-rw-r--r--web/app/view/UsersController.js140
-rw-r--r--web/arrowstyle.js530
-rw-r--r--web/beep.wavbin3047 -> 0 bytes
-rw-r--r--web/debug.html25
-rw-r--r--web/favicon.icobin1150 -> 0 bytes
-rw-r--r--web/l10n/ar.json136
-rw-r--r--web/l10n/bg.json136
-rw-r--r--web/l10n/cs.json136
-rw-r--r--web/l10n/da.json136
-rw-r--r--web/l10n/de.json136
-rw-r--r--web/l10n/el.json136
-rw-r--r--web/l10n/en.json163
-rw-r--r--web/l10n/es.json136
-rw-r--r--web/l10n/fa.json136
-rw-r--r--web/l10n/fi.json136
-rw-r--r--web/l10n/fr.json136
-rw-r--r--web/l10n/he.json136
-rw-r--r--web/l10n/hu.json136
-rw-r--r--web/l10n/id.json136
-rw-r--r--web/l10n/it.json136
-rw-r--r--web/l10n/ka.json136
-rw-r--r--web/l10n/lo.json136
-rw-r--r--web/l10n/lt.json136
-rw-r--r--web/l10n/ml.json136
-rw-r--r--web/l10n/ms.json136
-rw-r--r--web/l10n/nb.json136
-rw-r--r--web/l10n/ne.json136
-rw-r--r--web/l10n/nl.json136
-rw-r--r--web/l10n/nn.json136
-rw-r--r--web/l10n/pl.json136
-rw-r--r--web/l10n/pt.json136
-rw-r--r--web/l10n/pt_BR.json136
-rw-r--r--web/l10n/ro.json136
-rw-r--r--web/l10n/ru.json136
-rw-r--r--web/l10n/si.json136
-rw-r--r--web/l10n/sk.json136
-rw-r--r--web/l10n/sl.json136
-rw-r--r--web/l10n/sr.json136
-rw-r--r--web/l10n/ta.json136
-rw-r--r--web/l10n/th.json136
-rw-r--r--web/l10n/tr.json136
-rw-r--r--web/l10n/uk.json136
-rw-r--r--web/l10n/vi.json136
-rw-r--r--web/l10n/zh.json136
-rw-r--r--web/locale.js78
-rw-r--r--web/release.html24
350 files changed, 3034 insertions, 13727 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/debug.xml b/debug.xml
index 9e2f495aa..6f2ccc738 100644
--- a/debug.xml
+++ b/debug.xml
@@ -331,6 +331,27 @@
<entry key='database.deletePositions'>
DELETE FROM positions WHERE serverTime &lt; :serverTime AND id NOT IN (SELECT positionId FROM devices);
</entry>
+
+ <entry key='database.selectAttributeAliases'>
+ SELECT * FROM attribute_aliases;
+ </entry>
+
+ <entry key='database.insertAttributeAlias'>
+ INSERT INTO attribute_aliases (deviceId, attribute, alias)
+ VALUES (:deviceId, :attribute, :alias);
+ </entry>
+
+ <entry key='database.updateAttributeAlias'>
+ UPDATE attribute_aliases SET
+ deviceId = :deviceId,
+ attribute = :attribute,
+ alias = :alias
+ WHERE id = :id;
+ </entry>
+
+ <entry key='database.deleteAttributeAlias'>
+ DELETE FROM attribute_aliases WHERE id = :id;
+ </entry>
<!-- PROTOCOL CONFIG -->
@@ -453,5 +474,10 @@
<entry key='hunterpro.port'>5116</entry>
<entry key='raveon.port'>5117</entry>
<entry key='cradlepoint.port'>5118</entry>
+ <entry key='arknavx8.port'>5119</entry>
+ <entry key='autograde.port'>5120</entry>
+ <entry key='oigo.port'>5121</entry>
+ <entry key='jpkorjar.port'>5122</entry>
+ <entry key='cguard.port'>5123</entry>
</properties>
diff --git a/pom.xml b/pom.xml
index 22000da3d..d1c63a59a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.traccar</groupId>
<artifactId>traccar</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.7-SNAPSHOT</version>
<name>traccar</name>
<url>https://www.traccar.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <jetty.version>9.2.17.v20160517</jetty.version> <!-- Jetty 9.3+ requires Java 8 -->
- <jersey.version>2.23.1</jersey.version>
+ <jetty.version>9.2.19.v20160908</jetty.version> <!-- Jetty 9.3+ requires Java 8 -->
+ <jersey.version>2.23.2</jersey.version>
</properties>
<dependencies>
@@ -45,12 +45,12 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>9.4.1208.jre7</version>
+ <version>9.4.1210.jre7</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
- <artifactId>HikariCP</artifactId>
- <version>2.4.7</version>
+ <artifactId>HikariCP-java7</artifactId>
+ <version>2.4.8</version> <!-- Newer versions require Java 8 -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
@@ -60,7 +60,7 @@
<dependency>
<groupId>com.ning</groupId> <!-- org.asynchttpclient starting from version 2.0 -->
<artifactId>async-http-client</artifactId>
- <version>1.9.38</version>
+ <version>1.9.39</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -136,7 +136,6 @@
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
diff --git a/schema/changelog-3.7.xml b/schema/changelog-3.7.xml
index d82dbe91b..1bae2aaff 100644
--- a/schema/changelog-3.7.xml
+++ b/schema/changelog-3.7.xml
@@ -17,7 +17,7 @@
<update tableName="groups">
<column name="groupid"/>
- <where>groupid NOT IN (SELECT id FROM (SELECT id FROM groups) AS groups_ids)</where>
+ <where>groupid NOT IN (SELECT id FROM (SELECT DISTINCT id FROM groups) AS groups_ids)</where>
</update>
<addColumn tableName="devices">
diff --git a/schema/changelog-3.8.xml b/schema/changelog-3.8.xml
new file mode 100644
index 000000000..304ac21d4
--- /dev/null
+++ b/schema/changelog-3.8.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
+ logicalFilePath="changelog-3.8">
+
+ <changeSet author="author" id="changelog-3.8">
+
+ <createTable tableName="attribute_aliases">
+ <column name="id" type="INT" autoIncrement="true">
+ <constraints primaryKey="true" />
+ </column>
+ <column name="deviceid" type="INT">
+ <constraints nullable="false" />
+ </column>
+ <column name="attribute" type="VARCHAR(128)">
+ <constraints nullable="false" />
+ </column>
+ <column name="alias" type="VARCHAR(128)">
+ <constraints nullable="false" />
+ </column>
+ </createTable>
+
+ <addForeignKeyConstraint baseTableName="attribute_aliases" baseColumnNames="deviceid" constraintName="fk_attribute_aliases_deviceid" referencedTableName="devices" referencedColumnNames="id" onDelete="CASCADE" />
+ <addUniqueConstraint tableName="attribute_aliases" columnNames="deviceid, attribute" constraintName="uk_deviceid_attribute" />
+
+ <update tableName="users">
+ <column name="map" type="VARCHAR(128)"/>
+ <where>map = 'osm'</where>
+ </update>
+ <update tableName="users">
+ <column name="distanceunit" type="VARCHAR(128)"/>
+ <where>distanceunit = 'km'</where>
+ </update>
+ <update tableName="users">
+ <column name="speedunit" type="VARCHAR(128)"/>
+ <where>speedunit = 'kmh'</where>
+ </update>
+
+ </changeSet>
+</databaseChangeLog>
diff --git a/schema/changelog-master.xml b/schema/changelog-master.xml
index 3b62537d0..341714ca8 100644
--- a/schema/changelog-master.xml
+++ b/schema/changelog-master.xml
@@ -9,4 +9,5 @@
<include file="changelog-3.5.xml" relativeToChangelogFile="true" />
<include file="changelog-3.6.xml" relativeToChangelogFile="true" />
<include file="changelog-3.7.xml" relativeToChangelogFile="true" />
+ <include file="changelog-3.8.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git a/setup/package.sh b/setup/package.sh
index 928a6e5b1..acbac434b 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -23,8 +23,7 @@ check_requirement () {
}
check_requirement "ls ../../ext-6.0.1" "Missing ../../ext-6.0.1 (https://www.sencha.com/legal/GPL/)"
-check_requirement "ls wrapper-delta-pack-*.tar.gz" "Missing wrapper-delta-pack-*.tar.gz (http://wrapper.tanukisoftware.com/doc/english/download.jsp)"
-check_requirement "ls wrapper-windows-x86-64-*.zip" "Missing wrapper-windows-x86-64-*.zip (http://www.krenger.ch/blog/tag/java-service-wrapper/)"
+check_requirement "ls yajsw-*.zip" "Missing yajsw-*.zip (http://yajsw.sourceforge.net/)"
check_requirement "ls innosetup-*.exe" "Missing isetup-*.exe (http://www.jrsoftware.org/isdl.php)"
check_requirement "which sencha" "Missing sencha cmd package (https://www.sencha.com/products/extjs/cmd-download/)"
check_requirement "which wine" "Missing wine package"
@@ -32,131 +31,123 @@ check_requirement "which innoextract" "Missing innoextract package"
check_requirement "which makeself" "Missing makeself package"
prepare () {
+ unzip yajsw-*.zip
+ mv yajsw-*/ yajsw/
- tar -xzf wrapper-delta-pack-*.tar.gz
- mv wrapper-delta-pack-*/ wrapper/
-
- ../tools/minify.sh
+ ../web/../tools/minify.sh
innoextract innosetup-*.exe
- echo "If you got any errors here try isetup version 5.5.5 (or check what versions are supported by 'innoextract -v')"
+ echo "If you got any errors here try isetup version 5.5.5 (or check supported versions using 'innoextract -v')"
}
cleanup () {
-
- rm -rf wrapper/
+ rm -r yajsw/
rm ../web/app.min.js
- rm -rf app/
+ rm -r app/
}
-prepare_windows_64 () {
- unzip wrapper-windows-x86-64-*.zip
- cp wrapper-windows-*/bin/wrapper.exe wrapper/bin/wrapper-windows-x86-32.exe
- cp wrapper-windows-*/lib/wrapper.dll wrapper/lib/wrapper-windows-x86-32.dll
- cp wrapper-windows-*/lib/wrapper.jar wrapper/lib/wrapper.jar
- rm -rf wrapper-windows-*/
-}
+copy_wrapper () {
+ cp yajsw/$1/setenv* out/$1
+ cp yajsw/$1/wrapper* out/$1
+ cp yajsw/$1/install* out/$1
+ cp yajsw/$1/start* out/$1
+ cp yajsw/$1/stop* out/$1
+ cp yajsw/$1/uninstall* out/$1
-prepare_linux_32 () {
- cp unix/setup.sh out
- cp wrapper/bin/wrapper-linux-x86-32 out/bin/wrapper
- cp wrapper/lib/libwrapper-linux-x86-32.so out/lib/libwrapper.so
-}
+ chmod +x out/$1/*
-prepare_linux_64 () {
- cp unix/setup.sh out
- cp wrapper/bin/wrapper-linux-x86-64 out/bin/wrapper
- cp wrapper/lib/libwrapper-linux-x86-64.so out/lib/libwrapper.so
-}
+ cp yajsw/conf/wrapper.conf.default out/conf
-prepare_linux_arm () {
- cp unix/linux-arm-setup.sh out/setup.sh
- cp wrapper/bin/wrapper-linux-armel-32 out/bin
- cp wrapper/bin/wrapper-linux-armhf-32 out/bin
- cp wrapper/lib/libwrapper-linux-armel-32.so out/lib
- cp wrapper/lib/libwrapper-linux-armhf-32.so out/lib
-}
+ touch out/conf/wrapper.conf
+ echo "wrapper.java.command=java" >> out/conf/wrapper.conf
+ echo "wrapper.java.app.jar=tracker-server.jar" >> out/conf/wrapper.conf
+ echo "wrapper.app.parameter.1=./conf/traccar.xml" >> out/conf/wrapper.conf
+ echo "wrapper.java.additional.1=-Dfile.encoding=UTF-8" >> out/conf/wrapper.conf
+ echo "wrapper.logfile=logs/wrapper.log.YYYYMMDD" >> out/conf/wrapper.conf
+ echo "wrapper.logfile.rollmode=DATE" >> out/conf/wrapper.conf
+ echo "wrapper.ntservice.name=traccar" >> out/conf/wrapper.conf
+ echo "wrapper.ntservice.displayname=Traccar" >> out/conf/wrapper.conf
+ echo "wrapper.ntservice.description=Traccar" >> out/conf/wrapper.conf
-prepare_macosx_64 () {
- cp unix/setup.sh out
- cp wrapper/bin/wrapper-macosx-universal-64 out/bin/wrapper
- cp wrapper/lib/libwrapper-macosx-universal-64.jnilib out/lib/libwrapper.jnilib
-}
+ cp -r yajsw/lib/core out/lib
+ rm out/lib/core/ReadMe.txt
-package_windows () {
+ cp -r yajsw/lib/extended out/lib
+ rm out/lib/extended/ReadMe.txt
- if [ "$#" -gt 1 ]
- then
- eval $2
- fi
+ cp yajsw/templates/* out/templates
- wine app/ISCC.exe windows/traccar.iss
+ cp yajsw/wrapper*.jar out
- zip -j traccar-$1-$VERSION.zip windows/Output/traccar-setup.exe README.txt
-
- rm -rf windows/Output/
- rm -rf tmp/
+ if which xattr &>/dev/null
+ then
+ xattr -dr com.apple.quarantine out
+ fi
}
-package_unix () {
-
- mkdir -p out/{bin,conf,data,lib,logs,web,schema}
-
- cp wrapper/src/bin/sh.script.in out/bin/traccar
- cp wrapper/lib/wrapper.jar out/lib
- cp wrapper/src/conf/wrapper.conf.in out/conf/wrapper.conf
-
- sed -i.bak 's/tail -1/tail -n 1/g' out/bin/traccar
- chmod +x out/bin/traccar
-
+copy_files () {
cp ../target/tracker-server.jar out
cp ../target/lib/* out/lib
cp ../schema/* out/schema
cp -r ../web/* out/web
- cp unix/traccar.xml out/conf
+ cp traccar.xml out/conf
+}
- sed -i.bak 's/@app.name@/traccar/g' out/bin/traccar
- sed -i.bak 's/@app.long.name@/traccar/g' out/bin/traccar
+package_windows () {
+ mkdir -p out/{bat,conf,data,lib,logs,web,schema,templates}
+
+ copy_wrapper "bat"
+ copy_files
- sed -i.bak '/wrapper.java.classpath.1/a\
-wrapper.java.classpath.2=../tracker-server.jar' out/conf/wrapper.conf
- sed -i.bak '/wrapper.app.parameter.1/a\
-wrapper.app.parameter.2=../conf/traccar.xml' out/conf/wrapper.conf
- sed -i.bak 's/wrapper.java.additional.1=/wrapper.java.additional.1=-Dfile.encoding=UTF-8/g' out/conf/wrapper.conf
- sed -i.bak 's/<YourMainClass>/org.traccar.Main/g' out/conf/wrapper.conf
- sed -i.bak 's/@app.name@/traccar/g' out/conf/wrapper.conf
- sed -i.bak 's/@app.long.name@/traccar/g' out/conf/wrapper.conf
- sed -i.bak 's/@app.description@/traccar/g' out/conf/wrapper.conf
- sed -i.bak 's/wrapper.logfile=..\/logs\/wrapper.log/wrapper.logfile=..\/logs\/wrapper.log.YYYYMMDD\
-wrapper.logfile.rollmode=DATE/g' out/conf/wrapper.conf
+ wine app/ISCC.exe traccar.iss
- rm out/bin/traccar.bak
- rm out/conf/wrapper.conf.bak
+ zip -j traccar-windows-$VERSION.zip Output/traccar-setup.exe README.txt
- eval $2
+ rm -r Output
+ rm -r tmp
+ rm -r out
+}
- makeself out traccar.run "traccar" "chmod +x setup.sh ; ./setup.sh"
- zip -j traccar-$1-$VERSION.zip traccar.run README.txt
+package_unix () {
+ mkdir -p out/{bin,conf,data,lib,logs,web,schema,templates}
+
+ copy_wrapper "bin"
+ copy_files
+
+ makeself out traccar.run "traccar" "\
+if which java &>/dev/null ; \
+then \
+if [ \$(java -version 2>&1 | grep -i version | sed 's/.*version \"\(.*\)\.\(.*\)\..*\"/\1\2/; 1q') -lt 17 ] ; \
+then \
+echo 'Java 7 or higher required' ; \
+else \
+mkdir -p /opt/traccar ; \
+cp -r * /opt/traccar ; \
+chmod -R go+rX /opt/traccar ; \
+/opt/traccar/bin/installDaemon.sh ; \
+fi ; \
+else \
+echo 'Java runtime is required' ; \
+fi"
+
+ zip -j traccar-linux-$VERSION.zip traccar.run README.txt
+ cp traccar-linux-$VERSION.zip traccar-macos-$VERSION.zip
rm traccar.run
- rm -rf out/
+ rm -r out
}
package_universal () {
-
mkdir -p out/{conf,data,lib,logs,web,schema}
- cp ../target/tracker-server.jar out
- cp ../target/lib/* out/lib
- cp ../schema/* out/schema
- cp -r ../web/* out/web
- cp windows/traccar.xml out/conf
+ copy_files
+
cp README.txt out
cd out
- zip -r ../traccar-$1-$VERSION.zip * README.txt
+ zip -r ../traccar-other-$VERSION.zip *
cd ..
rm -rf out/
@@ -164,12 +155,8 @@ package_universal () {
prepare
-package_windows "windows-32"
-package_windows "windows-64" "prepare_windows_64"
-package_unix "linux-32" "prepare_linux_32"
-package_unix "linux-64" "prepare_linux_64"
-package_unix "linux-arm" "prepare_linux_arm"
-package_unix "macosx-64" "prepare_macosx_64"
-package_universal "other"
+package_windows
+package_unix
+package_universal
cleanup
diff --git a/setup/traccar.iss b/setup/traccar.iss
new file mode 100644
index 000000000..6858a1152
--- /dev/null
+++ b/setup/traccar.iss
@@ -0,0 +1,51 @@
+[Setup]
+AppName=Traccar
+AppVersion=3.7
+DefaultDirName={pf}\Traccar
+AlwaysRestart=yes
+OutputBaseFilename=traccar-setup
+
+[Dirs]
+Name: "{app}\bat"
+Name: "{app}\conf"
+Name: "{app}\data"
+Name: "{app}\lib"
+Name: "{app}\logs"
+Name: "{app}\web"
+Name: "{app}\schema"
+Name: "{app}\templates"
+
+[Files]
+Source: "out\*"; DestDir: "{app}"; Flags: recursesubdirs
+
+[Run]
+Filename: "{app}\bat\installService.bat"
+
+[UninstallRun]
+Filename: "{app}\bat\uninstallService.bat"
+
+[Code]
+function GetLocalMachine(): Integer;
+begin
+ if IsWin64 then
+ begin
+ Result := HKLM64;
+ end
+ else
+ begin
+ Result := HKEY_LOCAL_MACHINE;
+ end;
+end;
+
+function InitializeSetup(): Boolean;
+begin
+ if RegKeyExists(GetLocalMachine(), 'SOFTWARE\JavaSoft\Java Runtime Environment') then
+ begin
+ Result := true;
+ end
+ else
+ begin
+ Result := false;
+ MsgBox('This application requires Java Runtime Environment version 7 or later. Please download and install the JRE and run this setup again. If you have Java installed and still get this error, you need to re-install it from offline installer (for more info see https://www.traccar.org/windows/).', mbCriticalError, MB_OK);
+ end;
+end;
diff --git a/setup/unix/traccar.xml b/setup/traccar.xml
index b602e6321..ccdc5b745 100644
--- a/setup/unix/traccar.xml
+++ b/setup/traccar.xml
@@ -8,32 +8,33 @@
<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
- <entry key='web.path'>/opt/traccar/web</entry>
+ <entry key='web.path'>./web</entry>
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>google</entry>
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
- <entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>
+ <entry key='logger.file'>./logs/tracker-server.log</entry>
<entry key='event.enable'>true</entry>
- <entry key='event.suppressRepeated'>60</entry>
<entry key='event.overspeedHandler'>true</entry>
- <entry key='event.globalSpeedLimit'>90</entry>
+ <entry key='event.overspeed.notRepeat'>true</entry>
<entry key='event.motionHandler'>true</entry>
<entry key='event.geofenceHandler'>true</entry>
+ <entry key='event.alertHandler'>true</entry>
+ <entry key='event.ignitionHandler'>true</entry>
<!-- DATABASE CONFIG -->
<entry key='database.driver'>org.h2.Driver</entry>
- <entry key='database.url'>jdbc:h2:/opt/traccar/data/database</entry>
+ <entry key='database.url'>jdbc:h2:./data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>
<entry key='database.ignoreUnknown'>true</entry>
- <entry key='database.changelog'>/opt/traccar/schema/changelog-master.xml</entry>
+ <entry key='database.changelog'>./schema/changelog-master.xml</entry>
<entry key='database.selectServers'>
SELECT * FROM server;
@@ -273,6 +274,10 @@
DELETE FROM notifications WHERE id = :id;
</entry>
+ <entry key='database.deletePositions'>
+ DELETE FROM positions WHERE serverTime &lt; :serverTime AND id NOT IN (SELECT positionId FROM devices);
+ </entry>
+
<!-- PROTOCOL CONFIG -->
<entry key='gps103.port'>5001</entry>
@@ -392,5 +397,7 @@
<entry key='carcell.port'>5114</entry>
<entry key='obddongle.port'>5115</entry>
<entry key='hunterpro.port'>5116</entry>
+ <entry key='raveon.port'>5117</entry>
+ <entry key='cradlepoint.port'>5118</entry>
</properties>
diff --git a/setup/unix/linux-arm-setup.sh b/setup/unix/linux-arm-setup.sh
deleted file mode 100755
index 8128e9396..000000000
--- a/setup/unix/linux-arm-setup.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-UNIX_PATH="/opt/traccar"
-
-if [ $(java -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -lt 17 ]
-then
- echo "Please install Java version 7 or higher"
-else
- mkdir -p $UNIX_PATH
- cp -rf * $UNIX_PATH
- chmod -R go+rX $UNIX_PATH
- if [ -z "`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`" ]
- then
- mv $UNIX_PATH/bin/wrapper-linux-armel-32 $UNIX_PATH/bin/wrapper
- mv $UNIX_PATH/lib/libwrapper-linux-armel-32.so $UNIX_PATH/lib/libwrapper.so
- else
- mv $UNIX_PATH/bin/wrapper-linux-armhf-32 $UNIX_PATH/bin/wrapper
- mv $UNIX_PATH/lib/libwrapper-linux-armhf-32.so $UNIX_PATH/lib/libwrapper.so
- fi
- $UNIX_PATH/bin/traccar install
- rm $UNIX_PATH/setup.sh
-fi
diff --git a/setup/unix/setup.sh b/setup/unix/setup.sh
deleted file mode 100755
index 478966ea0..000000000
--- a/setup/unix/setup.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-UNIX_PATH="/opt/traccar"
-
-if which java &>/dev/null
-then
- if [ $(java -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -lt 17 ]
- then
- echo "Java 7 or higher required"
- else
- mkdir -p $UNIX_PATH
- cp -rf * $UNIX_PATH
- chmod -R go+rX $UNIX_PATH
- $UNIX_PATH/bin/traccar install
- rm $UNIX_PATH/setup.sh
- fi
-else
- echo "Java runtime is required"
-fi
diff --git a/setup/windows/traccar.iss b/setup/windows/traccar.iss
deleted file mode 100644
index f5d41c6b0..000000000
--- a/setup/windows/traccar.iss
+++ /dev/null
@@ -1,90 +0,0 @@
-[Setup]
-AppName=Traccar
-AppVersion=3.6
-DefaultDirName={pf}\Traccar
-AlwaysRestart=yes
-OutputBaseFilename=traccar-setup
-
-[Dirs]
-Name: "{app}\bin"
-Name: "{app}\conf"
-Name: "{app}\data"
-Name: "{app}\lib"
-Name: "{app}\logs"
-Name: "{app}\web"
-Name: "{app}\schema"
-
-[Files]
-Source: "..\wrapper\bin\wrapper-windows-x86-32.exe"; DestDir: "{app}\bin"; DestName: "wrapper.exe"
-Source: "..\wrapper\src\bin\App.bat.in"; DestDir: "{app}\bin"; DestName: "Traccar.bat"
-Source: "..\wrapper\src\bin\InstallApp-NT.bat.in"; DestDir: "{app}\bin"; DestName: "InstallTraccar-NT.bat"
-Source: "..\wrapper\src\bin\UninstallApp-NT.bat.in"; DestDir: "{app}\bin"; DestName: "UninstallTraccar-NT.bat"
-Source: "..\wrapper\lib\wrapper-windows-x86-32.dll"; DestDir: "{app}\lib"; DestName: "wrapper.dll"
-Source: "..\wrapper\lib\wrapper.jar"; DestDir: "{app}\lib";
-Source: "..\wrapper\src\conf\wrapper.conf.in"; DestDir: "{app}\conf"; DestName: "wrapper.conf"; AfterInstall: ConfigureWrapper
-
-Source: "..\..\target\tracker-server.jar"; DestDir: "{app}"
-Source: "..\..\target\lib\*"; DestDir: "{app}\lib"
-Source: "..\..\schema\*"; DestDir: "{app}\schema"
-Source: "..\..\web\*"; DestDir: "{app}\web"; Flags: recursesubdirs
-Source: "traccar.xml"; DestDir: "{app}\conf"; AfterInstall: ConfigureApplication
-
-[Run]
-Filename: "{app}\bin\InstallTraccar-NT.bat"
-
-[UninstallRun]
-Filename: "{app}\bin\UninstallTraccar-NT.bat"
-
-[Code]
-function GetLocalMachine(): Integer;
-begin
- if IsWin64 then
- begin
- Result := HKLM64;
- end
- else
- begin
- Result := HKEY_LOCAL_MACHINE;
- end;
-end;
-
-function InitializeSetup(): Boolean;
-begin
- if RegKeyExists(GetLocalMachine(), 'SOFTWARE\JavaSoft\Java Runtime Environment') then
- begin
- Result := true;
- end
- else
- begin
- Result := false;
- MsgBox('This application requires Java Runtime Environment version 7 or later. Please download and install the JRE and run this setup again. If you have Java installed and still get this error, you need to re-install it from offline installer (for more info see https://www.traccar.org/windows/).', mbCriticalError, MB_OK);
- end;
-end;
-
-procedure ConfigureWrapper();
-var
- S: String;
-begin
- LoadStringFromFile(ExpandConstant(CurrentFileName), S);
- Insert('wrapper.java.classpath.2=../tracker-server.jar' + #13#10, S, Pos('wrapper.java.classpath.1', S));
- Insert(ExpandConstant('wrapper.app.parameter.2="{app}\conf\traccar.xml"') + #13#10, S, Pos('wrapper.app.parameter.1', S));
- StringChangeEx(S, 'wrapper.java.additional.1=', 'wrapper.java.additional.1=-Dfile.encoding=UTF-8', true);
- StringChangeEx(S, '<YourMainClass>', 'org.traccar.Main', true);
- StringChangeEx(S, '@app.name@', 'Traccar', true);
- StringChangeEx(S, '@app.long.name@', 'Traccar', true);
- StringChangeEx(S, '@app.description@', 'Traccar', true);
- StringChangeEx(S, 'wrapper.logfile=../logs/wrapper.log', 'wrapper.logfile=../logs/wrapper.log.YYYYMMDD' + #13#10 + 'wrapper.logfile.rollmode=DATE', true);
- SaveStringToFile(ExpandConstant(CurrentFileName), S, false);
-end;
-
-procedure ConfigureApplication();
-var
- S: String;
-begin
- LoadStringFromFile(ExpandConstant(CurrentFileName), S);
- StringChangeEx(S, '[WEB]', ExpandConstant('{app}\web'), true);
- StringChangeEx(S, '[LOG]', ExpandConstant('{app}\logs\tracker-server.log'), true);
- StringChangeEx(S, '[DATABASE]', ExpandConstant('{app}\data\database'), true);
- StringChangeEx(S, '[CHANGELOG]', ExpandConstant('{app}\schema\changelog-master.xml'), true);
- SaveStringToFile(ExpandConstant(CurrentFileName), S, false);
-end;
diff --git a/setup/windows/traccar.xml b/setup/windows/traccar.xml
deleted file mode 100644
index 053e2ca5a..000000000
--- a/setup/windows/traccar.xml
+++ /dev/null
@@ -1,396 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
-
-<properties>
-
- <!-- SERVER CONFIG -->
-
- <entry key='web.enable'>true</entry>
- <entry key='web.port'>8082</entry>
- <entry key='web.path'>[WEB]</entry>
-
- <entry key='geocoder.enable'>true</entry>
- <entry key='geocoder.type'>google</entry>
-
- <entry key='logger.enable'>true</entry>
- <entry key='logger.level'>all</entry>
- <entry key='logger.file'>[LOG]</entry>
-
- <entry key='event.enable'>true</entry>
- <entry key='event.suppressRepeated'>60</entry>
- <entry key='event.overspeedHandler'>true</entry>
- <entry key='event.globalSpeedLimit'>90</entry>
- <entry key='event.motionHandler'>true</entry>
- <entry key='event.geofenceHandler'>true</entry>
-
- <!-- DATABASE CONFIG -->
-
- <entry key='database.driver'>org.h2.Driver</entry>
- <entry key='database.url'>jdbc:h2:[DATABASE]</entry>
- <entry key='database.user'>sa</entry>
- <entry key='database.password'></entry>
-
- <entry key='database.ignoreUnknown'>true</entry>
-
- <entry key='database.changelog'>[CHANGELOG]</entry>
-
- <entry key='database.selectServers'>
- SELECT * FROM server;
- </entry>
-
- <entry key='database.updateServer'>
- UPDATE server SET
- registration = :registration,
- readonly = :readonly,
- map = :map,
- bingKey = :bingKey,
- mapUrl = :mapUrl,
- distanceUnit = :distanceUnit,
- speedUnit = :speedUnit,
- latitude = :latitude,
- longitude = :longitude,
- zoom = :zoom,
- twelveHourFormat = :twelveHourFormat,
- attributes = :attributes
- WHERE id = :id;
- </entry>
-
- <entry key='database.loginUser'>
- SELECT * FROM users
- WHERE email = :email;
- </entry>
-
- <entry key='database.selectUser'>
- SELECT * FROM users
- WHERE id = :id;
- </entry>
-
- <entry key='database.selectUsersAll'>
- SELECT * FROM users;
- </entry>
-
- <entry key='database.insertUser'>
- INSERT INTO users (name, email, hashedPassword, salt, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, attributes)
- VALUES (:name, :email, :hashedPassword, :salt, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :attributes);
- </entry>
-
- <entry key='database.updateUser'>
- UPDATE users SET
- name = :name,
- email = :email,
- admin = :admin,
- map = :map,
- distanceUnit = :distanceUnit,
- speedUnit = :speedUnit,
- latitude = :latitude,
- longitude = :longitude,
- zoom = :zoom,
- twelveHourFormat = :twelveHourFormat,
- attributes = :attributes
- WHERE id = :id;
- </entry>
-
- <entry key='database.updateUserPassword'>
- UPDATE users SET hashedPassword = :hashedPassword, salt = :salt WHERE id = :id;
- </entry>
-
- <entry key='database.deleteUser'>
- DELETE FROM users WHERE id = :id;
- </entry>
-
- <entry key='database.selectDevicePermissions'>
- SELECT userId, deviceId FROM user_device;
- </entry>
-
- <entry key='database.selectGroupPermissions'>
- SELECT userId, groupId FROM user_group;
- </entry>
-
- <entry key='database.selectDevicesAll'>
- SELECT * FROM devices;
- </entry>
-
- <entry key='database.insertDevice'>
- INSERT INTO devices (name, uniqueId, groupId, attributes) VALUES (:name, :uniqueId, :groupId, :attributes);
- </entry>
-
- <entry key='database.updateDevice'>
- UPDATE devices SET name = :name, uniqueId = :uniqueId, groupId = :groupId, attributes = :attributes WHERE id = :id;
- </entry>
-
- <entry key='database.updateDeviceStatus'>
- UPDATE devices SET lastUpdate = :lastUpdate WHERE id = :id;
- </entry>
-
- <entry key='database.deleteDevice'>
- DELETE FROM devices WHERE id = :id;
- </entry>
-
- <entry key='database.linkDevice'>
- INSERT INTO user_device (userId, deviceId) VALUES (:userId, :deviceId);
- </entry>
-
- <entry key='database.unlinkDevice'>
- DELETE FROM user_device WHERE userId = :userId AND deviceId = :deviceId;
- </entry>
-
- <entry key='database.selectGroupsAll'>
- SELECT * FROM groups;
- </entry>
-
- <entry key='database.insertGroup'>
- INSERT INTO groups (name, groupId, attributes) VALUES (:name, :groupId, :attributes);
- </entry>
-
- <entry key='database.updateGroup'>
- UPDATE groups SET name = :name, groupId = :groupId, attributes = :attributes WHERE id = :id;
- </entry>
-
- <entry key='database.deleteGroup'>
- DELETE FROM groups WHERE id = :id;
- </entry>
-
- <entry key='database.linkGroup'>
- INSERT INTO user_group (userId, groupId) VALUES (:userId, :groupId);
- </entry>
-
- <entry key='database.unlinkGroup'>
- DELETE FROM user_group WHERE userId = :userId AND groupId = :groupId;
- </entry>
-
- <entry key='database.selectPositions'>
- SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime;
- </entry>
-
- <entry key='database.insertPosition'>
- INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
- VALUES (:deviceId, :protocol, :now, :deviceTime, :fixTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);
- </entry>
-
- <entry key='database.selectLatestPositions'>
- SELECT * FROM positions WHERE id IN (SELECT positionId FROM devices);
- </entry>
-
- <entry key='database.updateLatestPosition'>
- UPDATE devices SET positionId = :id WHERE id = :deviceId;
- </entry>
-
- <entry key='database.selectEvent'>
- SELECT * FROM events WHERE id = :id;
- </entry>
-
- <entry key='database.insertEvent'>
- INSERT INTO events (type, serverTime, deviceId, positionId, geofenceId, attributes)
- VALUES (:type, :serverTime, :deviceId, :positionId, :geofenceId, :attributes);
- </entry>
-
- <entry key='database.selectEvents'>
- SELECT * FROM events WHERE deviceId = :deviceId AND type LIKE :type AND serverTime BETWEEN :from AND :to ORDER BY serverTime DESC;
- </entry>
-
- <entry key='database.selectGeofence'>
- SELECT * FROM geofences
- WHERE id = :id;
- </entry>
-
- <entry key='database.selectGeofencesAll'>
- SELECT * FROM geofences;
- </entry>
-
- <entry key='database.insertGeofence'>
- INSERT INTO geofences (name, description, area, attributes)
- VALUES (:name, :description, :area, :attributes);
- </entry>
-
- <entry key='database.updateGeofence'>
- UPDATE geofences SET
- name = :name,
- description = :description,
- area = :area,
- attributes = :attributes
- WHERE id = :id;
- </entry>
-
- <entry key='database.deleteGeofence'>
- DELETE FROM geofences WHERE id = :id;
- </entry>
-
- <entry key='database.selectGeofencePermissions'>
- SELECT userId, geofenceId FROM user_geofence;
- </entry>
-
- <entry key='database.linkGeofence'>
- INSERT INTO user_geofence (userId, geofenceId) VALUES (:userId, :geofenceId);
- </entry>
-
- <entry key='database.unlinkGeofence'>
- DELETE FROM user_geofence WHERE userId = :userId AND geofenceId = :geofenceId;
- </entry>
-
- <entry key='database.selectGroupGeofences'>
- SELECT groupId, geofenceId FROM group_geofence;
- </entry>
-
- <entry key='database.linkGroupGeofence'>
- INSERT INTO group_geofence (groupId, geofenceId) VALUES (:groupId, :geofenceId);
- </entry>
-
- <entry key='database.unlinkGroupGeofence'>
- DELETE FROM group_geofence WHERE groupId = :groupId AND geofenceId = :geofenceId;
- </entry>
-
- <entry key='database.selectDeviceGeofences'>
- SELECT deviceId, geofenceId FROM device_geofence;
- </entry>
-
- <entry key='database.linkDeviceGeofence'>
- INSERT INTO device_geofence (deviceId, geofenceId) VALUES (:deviceId, :geofenceId);
- </entry>
-
- <entry key='database.unlinkDeviceGeofence'>
- DELETE FROM device_geofence WHERE deviceId = :deviceId AND geofenceId = :geofenceId;
- </entry>
-
- <entry key='database.selectNotifications'>
- SELECT * FROM notifications;
- </entry>
-
- <entry key='database.insertNotification'>
- INSERT INTO notifications (userId, type, attributes)
- VALUES (:userId, :type, :attributes);
- </entry>
-
- <entry key='database.updateNotification'>
- UPDATE notifications SET
- userId = :userId,
- type = :type,
- attributes = :attributes
- WHERE id = :id;
- </entry>
-
- <entry key='database.deleteNotification'>
- DELETE FROM notifications WHERE id = :id;
- </entry>
-
- <!-- PROTOCOL CONFIG -->
-
- <entry key='gps103.port'>5001</entry>
- <entry key='tk103.port'>5002</entry>
- <entry key='gl100.port'>5003</entry>
- <entry key='gl200.port'>5004</entry>
- <entry key='t55.port'>5005</entry>
- <entry key='xexun.port'>5006</entry>
- <entry key='xexun.extended'>false</entry>
- <entry key='totem.port'>5007</entry>
- <entry key='enfora.port'>5008</entry>
- <entry key='meiligao.port'>5009</entry>
- <entry key='trv.port'>5010</entry>
- <entry key='suntech.port'>5011</entry>
- <entry key='progress.port'>5012</entry>
- <entry key='h02.port'>5013</entry>
- <entry key='jt600.port'>5014</entry>
- <entry key='huabao.port'>5015</entry>
- <entry key='v680.port'>5016</entry>
- <entry key='pt502.port'>5017</entry>
- <entry key='tr20.port'>5018</entry>
- <entry key='navis.port'>5019</entry>
- <entry key='meitrack.port'>5020</entry>
- <entry key='skypatrol.port'>5021</entry>
- <entry key='gt02.port'>5022</entry>
- <entry key='gt06.port'>5023</entry>
- <entry key='megastek.port'>5024</entry>
- <entry key='navigil.port'>5025</entry>
- <entry key='gpsgate.port'>5026</entry>
- <entry key='teltonika.port'>5027</entry>
- <entry key='mta6.port'>5028</entry>
- <entry key='tzone.port'>5029</entry>
- <entry key='tlt2h.port'>5030</entry>
- <entry key='taip.port'>5031</entry>
- <entry key='wondex.port'>5032</entry>
- <entry key='cellocator.port'>5033</entry>
- <entry key='galileo.port'>5034</entry>
- <entry key='ywt.port'>5035</entry>
- <entry key='tk102.port'>5036</entry>
- <entry key='intellitrac.port'>5037</entry>
- <entry key='gpsmta.port'>5038</entry>
- <entry key='wialon.port'>5039</entry>
- <entry key='carscop.port'>5040</entry>
- <entry key='apel.port'>5041</entry>
- <entry key='manpower.port'>5042</entry>
- <entry key='globalsat.port'>5043</entry>
- <entry key='atrack.port'>5044</entry>
- <entry key='pt3000.port'>5045</entry>
- <entry key='ruptela.port'>5046</entry>
- <entry key='topflytech.port'>5047</entry>
- <entry key='laipac.port'>5048</entry>
- <entry key='aplicom.port'>5049</entry>
- <entry key='gotop.port'>5050</entry>
- <entry key='sanav.port'>5051</entry>
- <entry key='gator.port'>5052</entry>
- <entry key='noran.port'>5053</entry>
- <entry key='m2m.port'>5054</entry>
- <entry key='osmand.port'>5055</entry>
- <entry key='easytrack.port'>5056</entry>
- <entry key='gpsmarker.port'>5057</entry>
- <entry key='khd.port'>5058</entry>
- <entry key='piligrim.port'>5059</entry>
- <entry key='stl060.port'>5060</entry>
- <entry key='cartrack.port'>5061</entry>
- <entry key='minifinder.port'>5062</entry>
- <entry key='haicom.port'>5063</entry>
- <entry key='eelink.port'>5064</entry>
- <entry key='box.port'>5065</entry>
- <entry key='freedom.port'>5066</entry>
- <entry key='telic.port'>5067</entry>
- <entry key='trackbox.port'>5068</entry>
- <entry key='visiontek.port'>5069</entry>
- <entry key='orion.port'>5070</entry>
- <entry key='riti.port'>5071</entry>
- <entry key='ulbotech.port'>5072</entry>
- <entry key='tramigo.port'>5073</entry>
- <entry key='tr900.port'>5074</entry>
- <entry key='ardi01.port'>5075</entry>
- <entry key='xt013.port'>5076</entry>
- <entry key='autofon.port'>5077</entry>
- <entry key='gosafe.port'>5078</entry>
- <entry key='tt8850.port'>5079</entry>
- <entry key='bce.port'>5080</entry>
- <entry key='xirgo.port'>5081</entry>
- <entry key='calamp.port'>5082</entry>
- <entry key='mtx.port'>5083</entry>
- <entry key='tytan.port'>5084</entry>
- <entry key='avl301.port'>5085</entry>
- <entry key='castel.port'>5086</entry>
- <entry key='mxt.port'>5087</entry>
- <entry key='cityeasy.port'>5088</entry>
- <entry key='aquila.port'>5089</entry>
- <entry key='flextrack.port'>5090</entry>
- <entry key='blackkite.port'>5091</entry>
- <entry key='adm.port'>5092</entry>
- <entry key='watch.port'>5093</entry>
- <entry key='t800x.port'>5094</entry>
- <entry key='upro.port'>5095</entry>
- <entry key='auro.port'>5096</entry>
- <entry key='disha.port'>5097</entry>
- <entry key='thinkrace.port'>5098</entry>
- <entry key='pathaway.port'>5099</entry>
- <entry key='arnavi.port'>5100</entry>
- <entry key='nvs.port'>5101</entry>
- <entry key='kenji.port'>5102</entry>
- <entry key='astra.port'>5103</entry>
- <entry key='homtecs.port'>5104</entry>
- <entry key='fox.port'>5105</entry>
- <entry key='gnx.port'>5106</entry>
- <entry key='arknav.port'>5107</entry>
- <entry key='supermate.port'>5108</entry>
- <entry key='appello.port'>5109</entry>
- <entry key='idpl.port'>5110</entry>
- <entry key='huasheng.port'>5111</entry>
- <entry key='l100.port'>5112</entry>
- <entry key='granit.port'>5113</entry>
- <entry key='carcell.port'>5114</entry>
- <entry key='obddongle.port'>5115</entry>
- <entry key='hunterpro.port'>5116</entry>
-
-</properties>
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 615251d5f..837712e84 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -229,7 +229,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("AlertEventHandler", alertEventHandler);
}
- if (alertEventHandler != null) {
+ if (ignitionEventHandler != null) {
pipeline.addLast("IgnitionEventHandler", ignitionEventHandler);
}
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index c7359e76c..5a3dca878 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -16,6 +16,8 @@
package org.traccar;
import com.ning.http.client.AsyncHttpClient;
+
+import org.traccar.database.AliasesManager;
import org.traccar.database.ConnectionManager;
import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
@@ -134,13 +136,21 @@ public final class Context {
return eventForwarder;
}
+ private static AliasesManager aliasesManager;
+
+ public static AliasesManager getAliasesManager() {
+ return aliasesManager;
+ }
+
public static void init(String[] arguments) throws Exception {
config = new Config();
- if (arguments.length > 0) {
- config.load(arguments[0]);
+ if (arguments.length <= 0) {
+ throw new RuntimeException("Configuration file is not provided");
}
+ config.load(arguments[0]);
+
loggerEnabled = config.getBoolean("logger.enable");
if (loggerEnabled) {
Log.setupLogger(config);
@@ -233,6 +243,8 @@ public final class Context {
eventForwarder = new EventForwarder();
}
+ aliasesManager = new AliasesManager(dataManager);
+
}
public static void init(IdentityManager testIdentityManager) {
diff --git a/src/org/traccar/api/resource/AttributeAliasResource.java b/src/org/traccar/api/resource/AttributeAliasResource.java
new file mode 100644
index 000000000..2417fb0ec
--- /dev/null
+++ b/src/org/traccar/api/resource/AttributeAliasResource.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.api.resource;
+
+import java.sql.SQLException;
+import java.util.Collection;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.traccar.Context;
+import org.traccar.api.BaseResource;
+import org.traccar.model.AttributeAlias;
+
+@Path("attributes/aliases")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class AttributeAliasResource extends BaseResource {
+
+ @GET
+ public Collection<AttributeAlias> get(@QueryParam("deviceId") long deviceId) throws SQLException {
+ if (deviceId != 0) {
+ if (!Context.getPermissionsManager().isAdmin(getUserId())) {
+ Context.getPermissionsManager().checkDevice(getUserId(), deviceId);
+ }
+ return Context.getAliasesManager().getAttributeAliases(deviceId);
+ } else {
+ return Context.getAliasesManager().getAllAttributeAliases(getUserId());
+ }
+ }
+
+ @POST
+ public Response add(AttributeAlias entity) throws SQLException {
+ Context.getPermissionsManager().checkReadonly(getUserId());
+ if (!Context.getPermissionsManager().isAdmin(getUserId())) {
+ Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId());
+ }
+ Context.getAliasesManager().addAttributeAlias(entity);
+ return Response.ok(entity).build();
+ }
+
+ @Path("{id}")
+ @PUT
+ public Response update(@PathParam("id") long id, AttributeAlias entity) throws SQLException {
+ Context.getPermissionsManager().checkReadonly(getUserId());
+ if (!Context.getPermissionsManager().isAdmin(getUserId())) {
+ AttributeAlias oldEntity = Context.getAliasesManager().getAttributeAlias(entity.getId());
+ Context.getPermissionsManager().checkDevice(getUserId(), oldEntity.getDeviceId());
+ Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId());
+ }
+ Context.getAliasesManager().updateAttributeAlias(entity);
+ return Response.ok(entity).build();
+ }
+
+ @Path("{id}")
+ @DELETE
+ public Response remove(@PathParam("id") long id) throws SQLException {
+ Context.getPermissionsManager().checkReadonly(getUserId());
+ if (!Context.getPermissionsManager().isAdmin(getUserId())) {
+ AttributeAlias entity = Context.getAliasesManager().getAttributeAlias(id);
+ Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId());
+ }
+ Context.getAliasesManager().removeArrtibuteAlias(id);
+ return Response.noContent().build();
+ }
+
+}
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index b12ab8c36..56787b7bb 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -88,6 +88,7 @@ public class DeviceResource extends BaseResource {
if (Context.getGeofenceManager() != null) {
Context.getGeofenceManager().refresh();
}
+ Context.getAliasesManager().removeDevice(id);
return Response.noContent().build();
}
diff --git a/src/org/traccar/database/AliasesManager.java b/src/org/traccar/database/AliasesManager.java
new file mode 100644
index 000000000..6c09e8731
--- /dev/null
+++ b/src/org/traccar/database/AliasesManager.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.database;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.traccar.Context;
+import org.traccar.helper.Log;
+import org.traccar.model.AttributeAlias;
+
+public class AliasesManager {
+
+ private final DataManager dataManager;
+
+ private final Map<Long, Set<AttributeAlias>> deviceAliases = new ConcurrentHashMap<>();
+ private final Map<Long, AttributeAlias> aliasesById = new ConcurrentHashMap<>();
+
+ public AliasesManager(DataManager dataManager) {
+ this.dataManager = dataManager;
+ if (dataManager != null) {
+ try {
+ for (AttributeAlias attributeAlias : dataManager.getAttributeAliases()) {
+ getAttributeAliases(attributeAlias.getDeviceId())
+ .add(attributeAlias);
+ aliasesById.put(attributeAlias.getId(), attributeAlias);
+ }
+ } catch (SQLException error) {
+ Log.warning(error);
+ }
+ }
+ }
+
+ public Set<AttributeAlias> getAttributeAliases(long deviceId) {
+ if (!deviceAliases.containsKey(deviceId)) {
+ deviceAliases.put(deviceId, new HashSet<AttributeAlias>());
+ }
+ return deviceAliases.get(deviceId);
+ }
+
+ public void removeDevice(long deviceId) {
+ for (AttributeAlias attributeAlias : getAttributeAliases(deviceId)) {
+ aliasesById.remove(attributeAlias.getId());
+ }
+ deviceAliases.remove(deviceId);
+ }
+
+ public void addAttributeAlias(AttributeAlias attributeAlias) throws SQLException {
+ dataManager.addAttributeAlias(attributeAlias);
+ aliasesById.put(attributeAlias.getId(), attributeAlias);
+ getAttributeAliases(attributeAlias.getDeviceId()).add(attributeAlias);
+ }
+
+ public void updateAttributeAlias(AttributeAlias attributeAlias) throws SQLException {
+ dataManager.updateAttributeAlias(attributeAlias);
+ AttributeAlias cachedAlias = aliasesById.get(attributeAlias.getId());
+ if (cachedAlias.getDeviceId() != attributeAlias.getDeviceId()) {
+ getAttributeAliases(cachedAlias.getDeviceId()).remove(cachedAlias);
+ cachedAlias.setDeviceId(attributeAlias.getDeviceId());
+ getAttributeAliases(cachedAlias.getDeviceId()).add(cachedAlias);
+ }
+ cachedAlias.setAttribute(attributeAlias.getAttribute());
+ cachedAlias.setAlias(attributeAlias.getAlias());
+ }
+
+ public void removeArrtibuteAlias(long attributeAliasId) throws SQLException {
+ dataManager.removeAttributeAlias(attributeAliasId);
+ AttributeAlias cachedAlias = aliasesById.get(attributeAliasId);
+ getAttributeAliases(cachedAlias.getDeviceId()).remove(cachedAlias);
+ aliasesById.remove(attributeAliasId);
+ }
+
+ public AttributeAlias getAttributeAlias(long deviceId, String attribute) {
+ for (AttributeAlias alias : getAttributeAliases(deviceId)) {
+ if (alias.getAttribute().equals(attribute)) {
+ return alias;
+ }
+ }
+ return null;
+ }
+
+ public Collection<AttributeAlias> getAllAttributeAliases(long userId) {
+ Collection<AttributeAlias> userDevicesAliases = new ArrayList<>();
+ for (long deviceId : Context.getPermissionsManager().getDevicePermissions(userId)) {
+ userDevicesAliases.addAll(getAttributeAliases(deviceId));
+ }
+ return userDevicesAliases;
+ }
+
+ public AttributeAlias getAttributeAlias(long id) {
+ return aliasesById.get(id);
+ }
+
+}
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 78f1b4109..02adb0455 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -37,6 +37,7 @@ import liquibase.resource.ResourceAccessor;
import org.traccar.Config;
import org.traccar.helper.Log;
+import org.traccar.model.AttributeAlias;
import org.traccar.model.Device;
import org.traccar.model.DevicePermission;
import org.traccar.model.Event;
@@ -305,7 +306,7 @@ public class DataManager {
}
public void clearPositionsHistory() throws SQLException {
- int historyDays = config.getInteger("database.positionsHistoryDays");
+ long historyDays = config.getInteger("database.positionsHistoryDays");
if (historyDays != 0) {
QueryBuilder.create(dataSource, getQuery("database.deletePositions"))
.setDate("serverTime", new Date(System.currentTimeMillis() - historyDays * 24 * 3600 * 1000))
@@ -460,4 +461,27 @@ public class DataManager {
.setLong("id", notification.getId())
.executeUpdate();
}
+
+ public Collection<AttributeAlias> getAttributeAliases() throws SQLException {
+ return QueryBuilder.create(dataSource, getQuery("database.selectAttributeAliases"))
+ .executeQuery(AttributeAlias.class);
+ }
+
+ public void addAttributeAlias(AttributeAlias attributeAlias) throws SQLException {
+ attributeAlias.setId(QueryBuilder.create(dataSource, getQuery("database.insertAttributeAlias"), true)
+ .setObject(attributeAlias)
+ .executeUpdate());
+ }
+
+ public void updateAttributeAlias(AttributeAlias attributeAlias) throws SQLException {
+ QueryBuilder.create(dataSource, getQuery("database.updateAttributeAlias"))
+ .setObject(attributeAlias)
+ .executeUpdate();
+ }
+
+ public void removeAttributeAlias(long attributeAliasId) throws SQLException {
+ QueryBuilder.create(dataSource, getQuery("database.deleteAttributeAlias"))
+ .setLong("id", attributeAliasId)
+ .executeUpdate();
+ }
}
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java
index 3476139f2..f32c7edd2 100644
--- a/src/org/traccar/database/DeviceManager.java
+++ b/src/org/traccar/database/DeviceManager.java
@@ -194,7 +194,7 @@ public class DeviceManager implements IdentityManager {
public boolean isLatestPosition(Position position) {
Position lastPosition = getLastPosition(position.getDeviceId());
- return lastPosition == null || position.getFixTime().compareTo(lastPosition.getFixTime()) > 0;
+ return lastPosition == null || position.getFixTime().compareTo(lastPosition.getFixTime()) >= 0;
}
public void updateLatestPosition(Position position) throws SQLException {
@@ -316,7 +316,87 @@ public class DeviceManager implements IdentityManager {
groupsById.remove(groupId);
}
- public String lookupAttribute(long deviceId, String attributeName) {
+ public boolean lookupServerBoolean(long deviceId, String attributeName, boolean defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, true);
+ if (result != null) {
+ return Boolean.parseBoolean(result);
+ }
+ return defaultValue;
+ }
+
+ public String lookupServerString(long deviceId, String attributeName, String defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, true);
+ if (result != null) {
+ return result;
+ }
+ return defaultValue;
+ }
+
+ public int lookupServerInteger(long deviceId, String attributeName, int defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, true);
+ if (result != null) {
+ return Integer.parseInt(result);
+ }
+ return defaultValue;
+ }
+
+ public long lookupServerLong(long deviceId, String attributeName, long defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, true);
+ if (result != null) {
+ return Long.parseLong(result);
+ }
+ return defaultValue;
+ }
+
+ public double lookupServerDouble(long deviceId, String attributeName, double defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, true);
+ if (result != null) {
+ return Double.parseDouble(result);
+ }
+ return defaultValue;
+ }
+
+ public boolean lookupConfigBoolean(long deviceId, String attributeName, boolean defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, false);
+ if (result != null) {
+ return Boolean.parseBoolean(result);
+ }
+ return defaultValue;
+ }
+
+ public String lookupConfigString(long deviceId, String attributeName, String defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, false);
+ if (result != null) {
+ return result;
+ }
+ return defaultValue;
+ }
+
+ public int lookupConfigInteger(long deviceId, String attributeName, int defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, false);
+ if (result != null) {
+ return Integer.parseInt(result);
+ }
+ return defaultValue;
+ }
+
+ public long lookupConfigLong(long deviceId, String attributeName, long defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, false);
+ if (result != null) {
+ return Long.parseLong(result);
+ }
+ return defaultValue;
+ }
+
+ public double lookupConfigDouble(long deviceId, String attributeName, double defaultValue) {
+ String result = lookupAttribute(deviceId, attributeName, false);
+ if (result != null) {
+ return Double.parseDouble(result);
+ }
+ return defaultValue;
+ }
+
+ private String lookupAttribute(long deviceId, String attributeName, boolean lookupServer) {
String result = null;
Device device = getDeviceById(deviceId);
if (device != null) {
@@ -338,8 +418,12 @@ public class DeviceManager implements IdentityManager {
}
}
if (result == null) {
- Server server = Context.getPermissionsManager().getServer();
- result = (String) server.getAttributes().get(attributeName);
+ if (lookupServer) {
+ Server server = Context.getPermissionsManager().getServer();
+ result = (String) server.getAttributes().get(attributeName);
+ } else {
+ result = Context.getConfig().getString(attributeName);
+ }
}
}
return result;
diff --git a/src/org/traccar/events/OverspeedEventHandler.java b/src/org/traccar/events/OverspeedEventHandler.java
index 302fa87cd..57f60d864 100644
--- a/src/org/traccar/events/OverspeedEventHandler.java
+++ b/src/org/traccar/events/OverspeedEventHandler.java
@@ -47,11 +47,8 @@ public class OverspeedEventHandler extends BaseEventHandler {
Collection<Event> events = new ArrayList<>();
double speed = position.getSpeed();
- double speedLimit = 0;
- String speedLimitAttribute = Context.getDeviceManager().lookupAttribute(device.getId(), ATTRIBUTE_SPEED_LIMIT);
- if (speedLimitAttribute != null) {
- speedLimit = Double.parseDouble(speedLimitAttribute);
- }
+ double speedLimit = Context.getDeviceManager()
+ .lookupServerDouble(device.getId(), ATTRIBUTE_SPEED_LIMIT, 0);
if (speedLimit == 0) {
return null;
}
diff --git a/src/org/traccar/helper/ObdDecoder.java b/src/org/traccar/helper/ObdDecoder.java
index 4686aa682..3196c25e4 100644
--- a/src/org/traccar/helper/ObdDecoder.java
+++ b/src/org/traccar/helper/ObdDecoder.java
@@ -25,9 +25,9 @@ public final class ObdDecoder {
private ObdDecoder() {
}
- public static final int MODE_CURRENT = 0x01;
- public static final int MODE_FREEZE_FRAME = 0x02;
- public static final int MODE_CODES = 0x03;
+ private static final int MODE_CURRENT = 0x01;
+ private static final int MODE_FREEZE_FRAME = 0x02;
+ private static final int MODE_CODES = 0x03;
private static final int PID_ENGINE_LOAD = 0x04;
private static final int PID_COOLANT_TEMPERATURE = 0x05;
@@ -42,7 +42,9 @@ public final class ObdDecoder {
switch (mode) {
case MODE_CURRENT:
case MODE_FREEZE_FRAME:
- return decodeData(Integer.parseInt(value.substring(0, 2), 16), value.substring(2));
+ return decodeData(
+ Integer.parseInt(value.substring(0, 2), 16),
+ Integer.parseInt(value.substring(2), 16), true);
case MODE_CODES:
return decodeCodes(value);
default:
@@ -54,7 +56,7 @@ public final class ObdDecoder {
return new AbstractMap.SimpleEntry<>(key, value);
}
- private static Map.Entry<String, Object> decodeCodes(String value) {
+ public static Map.Entry<String, Object> decodeCodes(String value) {
StringBuilder codes = new StringBuilder();
for (int i = 0; i < value.length() / 4; i++) {
int numValue = Integer.parseInt(value.substring(i * 4, (i + 1) * 4), 16);
@@ -75,28 +77,31 @@ public final class ObdDecoder {
}
codes.append(String.format("%04X", numValue & 0x3FFF));
}
- return createEntry("dtcs", codes.toString().replaceFirst(",", ""));
+ if (codes.length() > 0) {
+ return createEntry("dtcs", codes.toString().replaceFirst(",", ""));
+ } else {
+ return null;
+ }
}
- private static Map.Entry<String, Object> decodeData(int pid, String value) {
- int intValue = Integer.parseInt(value, 16);
+ public static Map.Entry<String, Object> decodeData(int pid, int value, boolean convert) {
switch (pid) {
case PID_ENGINE_LOAD:
- return createEntry("engineLoad", intValue * 100 / 255);
+ return createEntry("engineLoad", convert ? value * 100 / 255 : value);
case PID_COOLANT_TEMPERATURE:
- return createEntry("coolantTemperature", intValue - 40);
+ return createEntry("coolantTemperature", convert ? value - 40 : value);
case PID_ENGINE_RPM:
- return createEntry(Position.KEY_RPM, intValue / 4);
+ return createEntry(Position.KEY_RPM, convert ? value / 4 : value);
case PID_VEHICLE_SPEED:
- return createEntry(Position.KEY_OBD_SPEED, intValue);
+ return createEntry(Position.KEY_OBD_SPEED, value);
case PID_THROTTLE_POSITION:
- return createEntry("throttle", intValue * 100 / 255);
+ return createEntry("throttle", convert ? value * 100 / 255 : value);
case PID_MIL_DISTANCE:
- return createEntry("milDistance", intValue);
+ return createEntry("milDistance", value);
case PID_FUEL_LEVEL:
- return createEntry(Position.KEY_FUEL, intValue * 100 / 255);
+ return createEntry(Position.KEY_FUEL, convert ? value * 100 / 255 : value);
case PID_DISTANCE_CLEARED:
- return createEntry("clearedDistance", intValue);
+ return createEntry("clearedDistance", value);
default:
return null;
}
diff --git a/src/org/traccar/helper/PatternUtil.java b/src/org/traccar/helper/PatternUtil.java
index 88c3f053b..f665eb30d 100644
--- a/src/org/traccar/helper/PatternUtil.java
+++ b/src/org/traccar/helper/PatternUtil.java
@@ -25,20 +25,13 @@ public final class PatternUtil {
}
public static class MatchResult {
- private String pattern;
- private String matched;
- private String remaining;
+ private String patternMatch;
+ private String patternTail;
+ private String stringMatch;
+ private String stringTail;
- public String getPattern() {
- return this.pattern;
- }
-
- public String getMatched() {
- return this.matched;
- }
-
- public String getRemaining() {
- return this.remaining;
+ public String getPatternMatch() {
+ return patternMatch;
}
}
@@ -50,9 +43,10 @@ public final class PatternUtil {
try {
Matcher matcher = Pattern.compile("(" + pattern.substring(0, i) + ").*").matcher(input);
if (matcher.matches()) {
- result.pattern = pattern.substring(0, i);
- result.matched = matcher.group(1);
- result.remaining = input.substring(matcher.group(1).length());
+ result.patternMatch = pattern.substring(0, i);
+ result.patternTail = pattern.substring(i);
+ result.stringMatch = matcher.group(1);
+ result.stringTail = input.substring(matcher.group(1).length());
}
} catch (PatternSyntaxException error) {
Log.warning(error);
diff --git a/src/org/traccar/model/AttributeAlias.java b/src/org/traccar/model/AttributeAlias.java
new file mode 100644
index 000000000..023925ac3
--- /dev/null
+++ b/src/org/traccar/model/AttributeAlias.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.model;
+
+public class AttributeAlias {
+
+ private long id;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ private long deviceId;
+
+ public long getDeviceId() {
+ return deviceId;
+ }
+
+ public void setDeviceId(long deviceId) {
+ this.deviceId = deviceId;
+ }
+
+ private String attribute;
+
+ public String getAttribute() {
+ return attribute;
+ }
+
+ public void setAttribute(String attribute) {
+ this.attribute = attribute;
+ }
+
+ private String alias;
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+}
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 95a5011ec..c1058aef9 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -57,6 +57,7 @@ public class Position extends Message {
public static final String KEY_THROTTLE = "throttle";
public static final String KEY_MOTION = "motion";
public static final String KEY_ARMED = "armed";
+ public static final String KEY_ACCURACY = "accuracy";
public static final String KEY_OBD_SPEED = "obdSpeed";
public static final String KEY_OBD_ODOMETER = "obdOdometer";
@@ -89,6 +90,7 @@ public class Position extends Message {
public static final String ALARM_ACCELETATION = "hardAcceleration";
public static final String ALARM_BREAKING = "hardBreaking";
public static final String ALARM_FATIGUE_DRIVING = "fatigueDriving";
+ public static final String ALARM_POWER_CUT = "powerCut";
private String protocol;
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index fb8019900..ae1a58d3a 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -201,14 +201,14 @@ public final class NotificationFormatter {
DecimalFormat df = new DecimalFormat("#.##");
String result = df.format(speed) + " kn";
switch (Context.getPermissionsManager().getUser(userId).getSpeedUnit()) {
- case "kmh":
- result = df.format(UnitsConverter.kphFromKnots(speed)) + " km/h";
- break;
- case "mph":
- result = df.format(UnitsConverter.mphFromKnots(speed)) + " mph";
- break;
- default:
- break;
+ case "kmh":
+ result = df.format(UnitsConverter.kphFromKnots(speed)) + " km/h";
+ break;
+ case "mph":
+ result = df.format(UnitsConverter.mphFromKnots(speed)) + " mph";
+ break;
+ default:
+ break;
}
return result;
}
diff --git a/src/org/traccar/protocol/AdmProtocol.java b/src/org/traccar/protocol/AdmProtocol.java
index 40dd340cf..067ccf053 100644
--- a/src/org/traccar/protocol/AdmProtocol.java
+++ b/src/org/traccar/protocol/AdmProtocol.java
@@ -32,7 +32,7 @@ public class AdmProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 1, -3, 0));
diff --git a/src/org/traccar/protocol/ApelProtocol.java b/src/org/traccar/protocol/ApelProtocol.java
index ae1af1243..47bce37a0 100644
--- a/src/org/traccar/protocol/ApelProtocol.java
+++ b/src/org/traccar/protocol/ApelProtocol.java
@@ -32,7 +32,7 @@ public class ApelProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 4, 0));
diff --git a/src/org/traccar/protocol/AplicomProtocol.java b/src/org/traccar/protocol/AplicomProtocol.java
index 8aae9554a..5155133c9 100644
--- a/src/org/traccar/protocol/AplicomProtocol.java
+++ b/src/org/traccar/protocol/AplicomProtocol.java
@@ -30,7 +30,7 @@ public class AplicomProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new AplicomFrameDecoder());
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 23397b51c..d1f92ea0a 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
import java.net.SocketAddress;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date;
@@ -75,11 +76,12 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
return unitId;
}
- private static final int DEFAULT_SELECTOR = 0x0002FC;
+ private static final int DEFAULT_SELECTOR_D = 0x0002fC;
+ private static final int DEFAULT_SELECTOR_E = 0x007ffc;
private static final int EVENT_DATA = 119;
- private void decodeEventData(int event, ChannelBuffer buf) {
+ private void decodeEventData(Position position, ChannelBuffer buf, int event) {
switch (event) {
case 2:
case 40:
@@ -106,6 +108,9 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
case 130:
buf.readUnsignedInt(); // incorrect
break;
+ case 188:
+ decodeEB(position, buf);
+ break;
default:
break;
}
@@ -191,44 +196,12 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
}
}
- @Override
- protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
-
- ChannelBuffer buf = (ChannelBuffer) msg;
-
- buf.readUnsignedByte(); // marker
- int version = buf.readUnsignedByte();
-
- String imei;
- if ((version & 0x80) != 0) {
- imei = String.valueOf((buf.readUnsignedInt() << (3 * 8)) | buf.readUnsignedMedium());
- } else {
- imei = String.valueOf(imeiFromUnitId(buf.readUnsignedMedium()));
- }
-
- buf.readUnsignedShort(); // length
-
- int selector = DEFAULT_SELECTOR;
- if ((version & 0x40) != 0) {
- selector = buf.readUnsignedMedium();
- }
-
- Position position = new Position();
- position.setProtocol(getProtocolName());
- DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei);
- if (deviceSession == null) {
- return null;
- }
- position.setDeviceId(deviceSession.getDeviceId());
-
- int event = buf.readUnsignedByte();
- position.set(Position.KEY_EVENT, event);
- position.set("eventInfo", buf.readUnsignedByte());
+ private void decodeD(Position position, ChannelBuffer buf, int selector, int event) {
if ((selector & 0x0008) != 0) {
position.setValid((buf.readUnsignedByte() & 0x40) != 0);
} else {
- return null; // no location data
+ getLastLocation(position, null);
}
if ((selector & 0x0004) != 0) {
@@ -313,14 +286,261 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
}
if ((selector & 0x1000) != 0) {
- decodeEventData(event, buf);
+ decodeEventData(position, buf, event);
}
if (Context.getConfig().getBoolean(getProtocolName() + ".can")
&& buf.readable() && (selector & 0x1000) != 0 && event == EVENT_DATA) {
-
decodeCanData(buf, position);
}
+ }
+
+ private void decodeE(Position position, ChannelBuffer buf, int selector) {
+
+ if ((selector & 0x0008) != 0) {
+ position.set("tachographEvent", buf.readUnsignedShort());
+ }
+
+ if ((selector & 0x0004) != 0) {
+ getLastLocation(position, new Date(buf.readUnsignedInt() * 1000));
+ } else {
+ getLastLocation(position, null);
+ }
+
+ if ((selector & 0x0010) != 0) {
+ String time = buf.readUnsignedByte() + "s " + buf.readUnsignedByte() + "m " + buf.readUnsignedByte() + "h "
+ + buf.readUnsignedByte() + "M " + buf.readUnsignedByte() + "D " + buf.readUnsignedByte() + "Y "
+ + buf.readByte() + "m " + buf.readByte() + "h";
+ position.set("tachographTime", time);
+ }
+
+ position.set("workState", buf.readUnsignedByte());
+ position.set("driver1State", buf.readUnsignedByte());
+ position.set("driver2State", buf.readUnsignedByte());
+
+ if ((selector & 0x0020) != 0) {
+ position.set("tachographStatus", buf.readUnsignedByte());
+ }
+
+ if ((selector & 0x0040) != 0) {
+ position.set(Position.KEY_OBD_SPEED, buf.readUnsignedShort() / 256.0);
+ }
+
+ if ((selector & 0x0080) != 0) {
+ position.set(Position.KEY_OBD_ODOMETER, buf.readUnsignedInt() * 5);
+ }
+
+ if ((selector & 0x0100) != 0) {
+ position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt() * 5);
+ }
+
+ if ((selector & 0x8000) != 0) {
+ position.set("kFactor", buf.readUnsignedShort() * 0.001 + " pulses/m");
+ }
+
+ if ((selector & 0x0200) != 0) {
+ position.set(Position.KEY_RPM, buf.readUnsignedShort() * 0.125);
+ }
+
+ if ((selector & 0x0400) != 0) {
+ position.set("extraInfo", buf.readUnsignedShort());
+ }
+
+ if ((selector & 0x0800) != 0) {
+ position.set(Position.KEY_VIN, buf.readBytes(18).toString(StandardCharsets.US_ASCII).trim());
+ }
+ }
+
+ private void decodeH(Position position, ChannelBuffer buf, int selector) {
+
+ if ((selector & 0x0004) != 0) {
+ getLastLocation(position, new Date(buf.readUnsignedInt() * 1000));
+ } else {
+ getLastLocation(position, null);
+ }
+
+ if ((selector & 0x0040) != 0) {
+ buf.readUnsignedInt(); // reset time
+ }
+
+ if ((selector & 0x2000) != 0) {
+ buf.readUnsignedShort(); // snapshot counter
+ }
+
+ int index = 1;
+ while (buf.readableBytes() > 0) {
+
+ position.set("h" + index + "Index", buf.readUnsignedByte());
+
+ buf.readUnsignedShort(); // length
+
+ int n = buf.readUnsignedByte();
+ int m = buf.readUnsignedByte();
+
+ position.set("h" + index + "XLength", n);
+ position.set("h" + index + "YLength", m);
+
+ if ((selector & 0x0008) != 0) {
+ position.set("h" + index + "XType", buf.readUnsignedByte());
+ position.set("h" + index + "YType", buf.readUnsignedByte());
+ position.set("h" + index + "Parameters", buf.readUnsignedByte());
+ }
+
+ boolean percentageFormat = (selector & 0x0020) != 0;
+
+ StringBuilder data = new StringBuilder();
+ for (int i = 0; i < n * m; i++) {
+ if (percentageFormat) {
+ data.append(buf.readUnsignedByte() * 0.5).append("%").append(" ");
+ } else {
+ data.append(buf.readUnsignedShort()).append(" ");
+ }
+ }
+
+ position.set("h" + index + "Data", data.toString().trim());
+
+ position.set("h" + index + "Total", buf.readUnsignedInt());
+
+ if ((selector & 0x0010) != 0) {
+ int k = buf.readUnsignedByte();
+
+ data = new StringBuilder();
+ for (int i = 1; i < n; i++) {
+ if (k == 1) {
+ data.append(buf.readByte()).append(" ");
+ } else if (k == 2) {
+ data.append(buf.readShort()).append(" ");
+ }
+ }
+ position.set("h" + index + "XLimits", data.toString().trim());
+
+ data = new StringBuilder();
+ for (int i = 1; i < m; i++) {
+ if (k == 1) {
+ data.append(buf.readByte()).append(" ");
+ } else if (k == 2) {
+ data.append(buf.readShort()).append(" ");
+ }
+ }
+ position.set("h" + index + "YLimits", data.toString().trim());
+ }
+
+ index += 1;
+ }
+ }
+
+ private void decodeEB(Position position, ChannelBuffer buf) {
+
+ if (buf.readByte() != (byte) 'E' || buf.readByte() != (byte) 'B') {
+ return;
+ }
+
+ buf.readUnsignedByte(); // version
+ buf.readUnsignedShort(); // event
+ buf.readUnsignedByte(); // data validity
+ buf.readUnsignedByte(); // towed
+ buf.readUnsignedShort(); // length
+
+ while (buf.readableBytes() > 0) {
+ buf.readUnsignedByte(); // towed position
+ int type = buf.readUnsignedByte();
+ int length = buf.readUnsignedByte();
+
+ if (type == 0x01) {
+ position.set("brakeFlags", ChannelBuffers.hexDump(buf.readBytes(length)));
+ } else if (type == 0x02) {
+ position.set("wheelSpeed", buf.readUnsignedShort() / 256.0);
+ position.set("wheelSpeedDifference", buf.readUnsignedShort() / 256.0 - 125.0);
+ position.set("lateralAcceleration", buf.readUnsignedByte() / 10.0 - 12.5);
+ position.set("vehicleSpeed", buf.readUnsignedShort() / 256.0);
+ } else if (type == 0x03) {
+ position.set("axleLoadSum", buf.readUnsignedShort() * 2);
+ } else if (type == 0x04) {
+ position.set("tyrePressure", buf.readUnsignedByte() * 10);
+ position.set("pneumaticPressure", buf.readUnsignedByte() * 5);
+ } else if (type == 0x05) {
+ position.set("brakeLining", buf.readUnsignedByte() * 0.4);
+ position.set("brakeTemperature", buf.readUnsignedByte() * 10);
+ } else if (type == 0x06) {
+ position.set("totalDistance", buf.readUnsignedInt() * 5);
+ position.set("tripDistance", buf.readUnsignedInt() * 5);
+ position.set("serviceDistance", (buf.readUnsignedInt() - 2105540607) * 5);
+ } else if (type == 0x0A) {
+ position.set("brakeData", ChannelBuffers.hexDump(buf.readBytes(length)));
+ } else if (type == 0x0B) {
+ position.set("brakeMinMaxData", ChannelBuffers.hexDump(buf.readBytes(length)));
+ } else if (type == 0x0C) {
+ position.set("missingPgn", ChannelBuffers.hexDump(buf.readBytes(length)));
+ } else if (type == 0x0D) {
+ switch (buf.readUnsignedByte()) {
+ case 1:
+ position.set("brakeManufacturer", "Wabco");
+ break;
+ case 2:
+ position.set("brakeManufacturer", "Knorr");
+ break;
+ case 3:
+ position.set("brakeManufacturer", "Haldex");
+ break;
+ default:
+ position.set("brakeManufacturer", "Unknown");
+ break;
+ }
+ buf.readUnsignedByte();
+ buf.readBytes(17); // vin
+ position.set("towedDetectionStatus", buf.readUnsignedByte());
+ } else if (type == 0x0E) {
+ buf.skipBytes(length);
+ }
+ }
+ }
+
+ @Override
+ protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ ChannelBuffer buf = (ChannelBuffer) msg;
+
+ char protocol = (char) buf.readByte();
+ int version = buf.readUnsignedByte();
+
+ String imei;
+ if ((version & 0x80) != 0) {
+ imei = String.valueOf((buf.readUnsignedInt() << (3 * 8)) | buf.readUnsignedMedium());
+ } else {
+ imei = String.valueOf(imeiFromUnitId(buf.readUnsignedMedium()));
+ }
+
+ buf.readUnsignedShort(); // length
+
+ int selector = DEFAULT_SELECTOR_D;
+ if (protocol == 'E') {
+ selector = DEFAULT_SELECTOR_E;
+ }
+ if ((version & 0x40) != 0) {
+ selector = buf.readUnsignedMedium();
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei);
+ if (deviceSession == null) {
+ return null;
+ }
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ int event = buf.readUnsignedByte();
+ position.set(Position.KEY_EVENT, event);
+ position.set("eventInfo", buf.readUnsignedByte());
+
+ if (protocol == 'D') {
+ decodeD(position, buf, selector, event);
+ } else if (protocol == 'E') {
+ decodeE(position, buf, selector);
+ } else if (protocol == 'H') {
+ decodeH(position, buf, selector);
+ } else {
+ return null;
+ }
return position;
}
diff --git a/src/org/traccar/protocol/AppelloProtocol.java b/src/org/traccar/protocol/AppelloProtocol.java
index f7826caab..b129a7520 100755
--- a/src/org/traccar/protocol/AppelloProtocol.java
+++ b/src/org/traccar/protocol/AppelloProtocol.java
@@ -33,7 +33,7 @@ public class AppelloProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/AquilaProtocol.java b/src/org/traccar/protocol/AquilaProtocol.java
index 1bf5f4ee7..9607edd55 100644
--- a/src/org/traccar/protocol/AquilaProtocol.java
+++ b/src/org/traccar/protocol/AquilaProtocol.java
@@ -33,7 +33,7 @@ public class AquilaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/Ardi01Protocol.java b/src/org/traccar/protocol/Ardi01Protocol.java
index 595692cc5..5b7770647 100644
--- a/src/org/traccar/protocol/Ardi01Protocol.java
+++ b/src/org/traccar/protocol/Ardi01Protocol.java
@@ -33,7 +33,7 @@ public class Ardi01Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/ArknavProtocol.java b/src/org/traccar/protocol/ArknavProtocol.java
index 3b288b5ab..6b9398f68 100644
--- a/src/org/traccar/protocol/ArknavProtocol.java
+++ b/src/org/traccar/protocol/ArknavProtocol.java
@@ -33,7 +33,7 @@ public class ArknavProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\r'));
diff --git a/src/org/traccar/protocol/ArknavX8Protocol.java b/src/org/traccar/protocol/ArknavX8Protocol.java
new file mode 100644
index 000000000..3b78a27ff
--- /dev/null
+++ b/src/org/traccar/protocol/ArknavX8Protocol.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.string.StringDecoder;
+import org.jboss.netty.handler.codec.string.StringEncoder;
+import org.traccar.BaseProtocol;
+import org.traccar.CharacterDelimiterFrameDecoder;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class ArknavX8Protocol extends BaseProtocol {
+
+ public ArknavX8Protocol() {
+ super("arknavx8");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ';'));
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new ArknavX8ProtocolDecoder(ArknavX8Protocol.this));
+ }
+ });
+ }
+
+}
diff --git a/src/org/traccar/protocol/ArknavX8ProtocolDecoder.java b/src/org/traccar/protocol/ArknavX8ProtocolDecoder.java
new file mode 100644
index 000000000..c0a18311e
--- /dev/null
+++ b/src/org/traccar/protocol/ArknavX8ProtocolDecoder.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
+import org.traccar.helper.DateBuilder;
+import org.traccar.helper.Parser;
+import org.traccar.helper.PatternBuilder;
+import org.traccar.model.Position;
+
+import java.net.SocketAddress;
+import java.util.regex.Pattern;
+
+public class ArknavX8ProtocolDecoder extends BaseProtocolDecoder {
+
+ public ArknavX8ProtocolDecoder(ArknavX8Protocol protocol) {
+ super(protocol);
+ }
+
+ private static final Pattern PATTERN = new PatternBuilder()
+ .expression("(..),") // type
+ .number("(dd)(dd)(dd)") // date (yymmdd)
+ .number("(dd)(dd)(dd),") // time
+ .expression("([AV]),") // validity
+ .number("(d+)(dd.d+)([NS]),") // latitude
+ .number("(d+)(dd.d+)([EW]),") // longitude
+ .number("(d+.d+),") // speed
+ .number("(d+),") // course
+ .number("(d+.d+),") // hdop
+ .number("(d+)") // status
+ .compile();
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ String sentence = (String) msg;
+
+ if (sentence.charAt(2) != ',') {
+ getDeviceSession(channel, remoteAddress, sentence.substring(0, 15));
+ return null;
+ }
+
+ Parser parser = new Parser(PATTERN, sentence);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);
+ if (deviceSession == null) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ parser.next(); // type
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setValid(parser.next().equals("A"));
+ position.setLatitude(parser.nextCoordinate());
+ position.setLongitude(parser.nextCoordinate());
+ position.setSpeed(parser.nextDouble());
+ position.setCourse(parser.nextDouble());
+
+ position.set(Position.KEY_HDOP, parser.nextDouble());
+ position.set(Position.KEY_STATUS, parser.next());
+
+ return position;
+ }
+
+}
diff --git a/src/org/traccar/protocol/ArnaviProtocol.java b/src/org/traccar/protocol/ArnaviProtocol.java
index 5bdb68e86..29661b8d4 100644
--- a/src/org/traccar/protocol/ArnaviProtocol.java
+++ b/src/org/traccar/protocol/ArnaviProtocol.java
@@ -33,7 +33,7 @@ public class ArnaviProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/AstraProtocol.java b/src/org/traccar/protocol/AstraProtocol.java
index 0ff338599..461888c4f 100644
--- a/src/org/traccar/protocol/AstraProtocol.java
+++ b/src/org/traccar/protocol/AstraProtocol.java
@@ -32,14 +32,14 @@ public class AstraProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 1, 2, -3, 0));
pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
diff --git a/src/org/traccar/protocol/AstraProtocolDecoder.java b/src/org/traccar/protocol/AstraProtocolDecoder.java
index 1889fd3b9..d89a21082 100644
--- a/src/org/traccar/protocol/AstraProtocolDecoder.java
+++ b/src/org/traccar/protocol/AstraProtocolDecoder.java
@@ -68,6 +68,7 @@ public class AstraProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // index
+ position.setValid(true);
position.setLatitude(buf.readInt() * 0.000001);
position.setLongitude(buf.readInt() * 0.000001);
diff --git a/src/org/traccar/protocol/AtrackProtocol.java b/src/org/traccar/protocol/AtrackProtocol.java
index 356f7fc28..d61d31522 100644
--- a/src/org/traccar/protocol/AtrackProtocol.java
+++ b/src/org/traccar/protocol/AtrackProtocol.java
@@ -31,14 +31,14 @@ public class AtrackProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new AtrackFrameDecoder());
pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(AtrackProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(AtrackProtocol.this));
diff --git a/src/org/traccar/protocol/AuroProtocol.java b/src/org/traccar/protocol/AuroProtocol.java
index e8fad85fd..e5635f12a 100644
--- a/src/org/traccar/protocol/AuroProtocol.java
+++ b/src/org/traccar/protocol/AuroProtocol.java
@@ -33,7 +33,7 @@ public class AuroProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/AutoFonProtocol.java b/src/org/traccar/protocol/AutoFonProtocol.java
index dc2830edb..3e61b81a3 100644
--- a/src/org/traccar/protocol/AutoFonProtocol.java
+++ b/src/org/traccar/protocol/AutoFonProtocol.java
@@ -30,7 +30,7 @@ public class AutoFonProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new AutoFonFrameDecoder());
diff --git a/src/org/traccar/protocol/AutoGradeProtocol.java b/src/org/traccar/protocol/AutoGradeProtocol.java
new file mode 100644
index 000000000..1fb6b1ce2
--- /dev/null
+++ b/src/org/traccar/protocol/AutoGradeProtocol.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.string.StringDecoder;
+import org.jboss.netty.handler.codec.string.StringEncoder;
+import org.traccar.BaseProtocol;
+import org.traccar.CharacterDelimiterFrameDecoder;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class AutoGradeProtocol extends BaseProtocol {
+
+ public AutoGradeProtocol() {
+ super("autograde");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ')'));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectDecoder", new AutoGradeProtocolDecoder(AutoGradeProtocol.this));
+ }
+ });
+ }
+
+}
diff --git a/src/org/traccar/protocol/AutoGradeProtocolDecoder.java b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java
new file mode 100644
index 000000000..5c9dd7ece
--- /dev/null
+++ b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
+import org.traccar.helper.DateBuilder;
+import org.traccar.helper.Parser;
+import org.traccar.helper.PatternBuilder;
+import org.traccar.model.Position;
+
+import java.net.SocketAddress;
+import java.util.regex.Pattern;
+
+public class AutoGradeProtocolDecoder extends BaseProtocolDecoder {
+
+ public AutoGradeProtocolDecoder(AutoGradeProtocol protocol) {
+ super(protocol);
+ }
+
+ private static final Pattern PATTERN = new PatternBuilder()
+ .text("(")
+ .number("d{12}") // index
+ .number("(d{15})") // imei
+ .number("(dd)(dd)(dd)") // date
+ .expression("([AV])") // validity
+ .number("(d+)(dd.d+)([NS])") // latitude
+ .number("(d+)(dd.d+)([EW])") // longitude
+ .number("([d.]{5})") // speed
+ .number("(dd)(dd)(dd)") // time
+ .number("([d.]{6})") // course
+ .expression(".") // status
+ .number("A(xxxx)")
+ .number("B(xxxx)")
+ .number("C(xxxx)")
+ .number("D(xxxx)")
+ .number("E(xxxx)")
+ .number("K(xxxx)")
+ .number("L(xxxx)")
+ .number("M(xxxx)")
+ .number("N(xxxx)")
+ .number("O(xxxx)")
+ .any()
+ .compile();
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ Parser parser = new Parser(PATTERN, (String) msg);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ if (deviceSession == null) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
+
+ position.setValid(parser.next().equals("A"));
+ position.setLatitude(parser.nextCoordinate());
+ position.setLongitude(parser.nextCoordinate());
+ position.setSpeed(parser.nextDouble());
+
+ dateBuilder.setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setCourse(parser.nextDouble());
+
+ for (int i = 1; i <= 5; i++) {
+ position.set(Position.PREFIX_ADC + i, parser.next());
+ }
+
+ for (int i = 1; i <= 5; i++) {
+ position.set("can" + i, parser.next());
+ }
+
+ return position;
+ }
+
+}
diff --git a/src/org/traccar/protocol/Avl301Protocol.java b/src/org/traccar/protocol/Avl301Protocol.java
index 10ec5ae22..b8453cfb3 100644
--- a/src/org/traccar/protocol/Avl301Protocol.java
+++ b/src/org/traccar/protocol/Avl301Protocol.java
@@ -31,7 +31,7 @@ public class Avl301Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(256, 2, 1, -3, 0));
diff --git a/src/org/traccar/protocol/BceProtocol.java b/src/org/traccar/protocol/BceProtocol.java
index 06154c1c7..576eb6862 100644
--- a/src/org/traccar/protocol/BceProtocol.java
+++ b/src/org/traccar/protocol/BceProtocol.java
@@ -31,7 +31,7 @@ public class BceProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new BceFrameDecoder());
diff --git a/src/org/traccar/protocol/BlackKiteProtocol.java b/src/org/traccar/protocol/BlackKiteProtocol.java
index 3f1890f88..ea5120b2b 100644
--- a/src/org/traccar/protocol/BlackKiteProtocol.java
+++ b/src/org/traccar/protocol/BlackKiteProtocol.java
@@ -32,7 +32,7 @@ public class BlackKiteProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new GalileoFrameDecoder());
diff --git a/src/org/traccar/protocol/BoxProtocol.java b/src/org/traccar/protocol/BoxProtocol.java
index 33cfca282..6e60a0dd8 100644
--- a/src/org/traccar/protocol/BoxProtocol.java
+++ b/src/org/traccar/protocol/BoxProtocol.java
@@ -33,7 +33,7 @@ public class BoxProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\r'));
diff --git a/src/org/traccar/protocol/CalAmpProtocol.java b/src/org/traccar/protocol/CalAmpProtocol.java
index ccfd47cc4..a8eb59d0e 100644
--- a/src/org/traccar/protocol/CalAmpProtocol.java
+++ b/src/org/traccar/protocol/CalAmpProtocol.java
@@ -30,7 +30,7 @@ public class CalAmpProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new CalAmpProtocolDecoder(CalAmpProtocol.this));
diff --git a/src/org/traccar/protocol/CarTrackProtocol.java b/src/org/traccar/protocol/CarTrackProtocol.java
index 8a60e3ebb..0244c0ce1 100644
--- a/src/org/traccar/protocol/CarTrackProtocol.java
+++ b/src/org/traccar/protocol/CarTrackProtocol.java
@@ -33,7 +33,7 @@ public class CarTrackProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "##"));
diff --git a/src/org/traccar/protocol/CarcellProtocol.java b/src/org/traccar/protocol/CarcellProtocol.java
index 5982e9cf8..1303b56b3 100644
--- a/src/org/traccar/protocol/CarcellProtocol.java
+++ b/src/org/traccar/protocol/CarcellProtocol.java
@@ -37,7 +37,7 @@ public class CarcellProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\r'));
diff --git a/src/org/traccar/protocol/CarscopProtocol.java b/src/org/traccar/protocol/CarscopProtocol.java
index 4432fb87a..23c597a5b 100644
--- a/src/org/traccar/protocol/CarscopProtocol.java
+++ b/src/org/traccar/protocol/CarscopProtocol.java
@@ -33,7 +33,7 @@ public class CarscopProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '^'));
diff --git a/src/org/traccar/protocol/CastelProtocol.java b/src/org/traccar/protocol/CastelProtocol.java
index 604ff4ecb..42f7cbb88 100644
--- a/src/org/traccar/protocol/CastelProtocol.java
+++ b/src/org/traccar/protocol/CastelProtocol.java
@@ -33,7 +33,7 @@ public class CastelProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, -4, 0));
@@ -43,7 +43,7 @@ public class CastelProtocol extends BaseProtocol {
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
- server = new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new CastelProtocolDecoder(CastelProtocol.this));
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index 38fb11164..47df3735c 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -22,17 +22,53 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.helper.Checksum;
import org.traccar.helper.DateBuilder;
+import org.traccar.helper.ObdDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
public class CastelProtocolDecoder extends BaseProtocolDecoder {
+ private static final Map<Integer, Integer> PID_LENGTH_MAP = new HashMap<>();
+
+ static {
+ int[] l1 = {
+ 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0b, 0x0d,
+ 0x0e, 0x0f, 0x11, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x2c,
+ 0x2d, 0x2e, 0x2f, 0x30, 0x33, 0x43, 0x45, 0x46,
+ 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x51, 0x52,
+ 0x5a
+ };
+ int[] l2 = {
+ 0x02, 0x03, 0x0a, 0x0c, 0x10, 0x14, 0x15, 0x16,
+ 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1f, 0x21, 0x22,
+ 0x23, 0x31, 0x32, 0x3c, 0x3d, 0x3e, 0x3f, 0x42,
+ 0x44, 0x4d, 0x4e, 0x50, 0x53, 0x54, 0x55, 0x56,
+ 0x57, 0x58, 0x59
+ };
+ int[] l4 = {
+ 0x00, 0x01, 0x20, 0x24, 0x25, 0x26, 0x27, 0x28,
+ 0x29, 0x2a, 0x2b, 0x34, 0x35, 0x36, 0x37, 0x38,
+ 0x39, 0x3a, 0x3b, 0x40, 0x41, 0x4f
+ };
+ for (int i : l1) {
+ PID_LENGTH_MAP.put(i, 1);
+ }
+ for (int i : l2) {
+ PID_LENGTH_MAP.put(i, 2);
+ }
+ for (int i : l4) {
+ PID_LENGTH_MAP.put(i, 4);
+ }
+ }
+
public CastelProtocolDecoder(CastelProtocol protocol) {
super(protocol);
}
@@ -43,7 +79,13 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
private static final short MSG_SC_HEARTBEAT = 0x1003;
private static final short MSG_SC_HEARTBEAT_RESPONSE = (short) 0x9003;
private static final short MSG_SC_GPS = 0x4001;
+ private static final short MSG_SC_PID_DATA = 0x4002;
+ private static final short MSG_SC_SUPPORTED_PID = 0x4004;
+ private static final short MSG_SC_OBD_DATA = 0x4005;
+ private static final short MSG_SC_DTCS_PASSENGER = 0x4006;
+ private static final short MSG_SC_DTCS_COMMERCIAL = 0x400B;
private static final short MSG_SC_ALARM = 0x4007;
+ private static final short MSG_SC_CELL = 0x4008;
private static final short MSG_SC_GPS_SLEEP = 0x4009;
private static final short MSG_SC_AGPS_REQUEST = 0x5101;
private static final short MSG_SC_CURRENT_LOCATION = (short) 0xB001;
@@ -84,6 +126,63 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
return position;
}
+ private Position createPosition(DeviceSession deviceSession) {
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ getLastLocation(position, null);
+
+ return position;
+ }
+
+ private void decodeObd(Position position, ChannelBuffer buf, boolean groups) {
+
+ int count = buf.readUnsignedByte();
+
+ int[] pids = new int[count];
+ for (int i = 0; i < count; i++) {
+ pids[i] = buf.readUnsignedShort() & 0xff;
+ }
+
+ if (groups) {
+ buf.readUnsignedByte(); // group count
+ buf.readUnsignedByte(); // group size
+ }
+
+ for (int i = 0; i < count; i++) {
+ int value;
+ switch (PID_LENGTH_MAP.get(pids[i])) {
+ case 1:
+ value = buf.readUnsignedByte();
+ break;
+ case 2:
+ value = buf.readUnsignedShort();
+ break;
+ case 4:
+ value = buf.readInt();
+ break;
+ default:
+ value = 0;
+ break;
+ }
+ position.add(ObdDecoder.decodeData(pids[i], value, false));
+ }
+ }
+
+ private void decodeStat(Position position, ChannelBuffer buf) {
+
+ buf.readUnsignedInt(); // ACC ON time
+ buf.readUnsignedInt(); // UTC time
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
+ buf.readUnsignedInt(); // trip odometer
+ buf.readUnsignedInt(); // total fuel consumption
+ buf.readUnsignedShort(); // current fuel consumption
+ position.set(Position.KEY_STATUS, buf.readUnsignedInt());
+ buf.skipBytes(8);
+ }
+
private void sendResponse(
Channel channel, SocketAddress remoteAddress,
int version, ChannelBuffer id, short type, ChannelBuffer content) {
@@ -193,6 +292,50 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
return readPosition(deviceSession, buf);
+ } else if (type == MSG_SC_PID_DATA) {
+
+ Position position = createPosition(deviceSession);
+
+ decodeStat(position, buf);
+
+ buf.readUnsignedShort(); // sample rate
+ decodeObd(position, buf, true);
+
+ return position;
+
+ } else if (type == MSG_SC_DTCS_PASSENGER) {
+
+ Position position = createPosition(deviceSession);
+
+ decodeStat(position, buf);
+
+ buf.readUnsignedByte(); // flag
+ position.add(ObdDecoder.decodeCodes(ChannelBuffers.hexDump(buf.readBytes(buf.readUnsignedByte()))));
+
+ return position;
+
+ } else if (type == MSG_SC_OBD_DATA) {
+
+ Position position = createPosition(deviceSession);
+
+ decodeStat(position, buf);
+
+ buf.readUnsignedByte(); // flag
+ decodeObd(position, buf, false);
+
+ return position;
+
+ } else if (type == MSG_SC_CELL) {
+
+ Position position = createPosition(deviceSession);
+
+ decodeStat(position, buf);
+
+ position.set(Position.KEY_LAC, buf.readUnsignedShort());
+ position.set(Position.KEY_CID, buf.readUnsignedShort());
+
+ return position;
+
}
return null;
diff --git a/src/org/traccar/protocol/CellocatorProtocol.java b/src/org/traccar/protocol/CellocatorProtocol.java
index 22564d44f..e5f6ac8f6 100644
--- a/src/org/traccar/protocol/CellocatorProtocol.java
+++ b/src/org/traccar/protocol/CellocatorProtocol.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
@@ -31,7 +32,7 @@ public class CellocatorProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CellocatorFrameDecoder());
@@ -40,6 +41,15 @@ public class CellocatorProtocol extends BaseProtocol {
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
+
+ server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}
diff --git a/src/org/traccar/protocol/CguardProtocol.java b/src/org/traccar/protocol/CguardProtocol.java
new file mode 100644
index 000000000..1e6d212c8
--- /dev/null
+++ b/src/org/traccar/protocol/CguardProtocol.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
+import org.jboss.netty.handler.codec.string.StringDecoder;
+import org.jboss.netty.handler.codec.string.StringEncoder;
+import org.traccar.BaseProtocol;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class CguardProtocol extends BaseProtocol {
+
+ public CguardProtocol() {
+ super("cguard");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectDecoder", new CguardProtocolDecoder(CguardProtocol.this));
+ }
+ });
+ }
+
+}
diff --git a/src/org/traccar/protocol/CguardProtocolDecoder.java b/src/org/traccar/protocol/CguardProtocolDecoder.java
new file mode 100644
index 000000000..1646363e5
--- /dev/null
+++ b/src/org/traccar/protocol/CguardProtocolDecoder.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
+import org.traccar.helper.DateBuilder;
+import org.traccar.helper.Parser;
+import org.traccar.helper.PatternBuilder;
+import org.traccar.helper.UnitsConverter;
+import org.traccar.model.Position;
+
+import java.net.SocketAddress;
+import java.util.regex.Pattern;
+
+public class CguardProtocolDecoder extends BaseProtocolDecoder {
+
+ public CguardProtocolDecoder(CguardProtocol protocol) {
+ super(protocol);
+ }
+
+ private static final Pattern PATTERN = new PatternBuilder()
+ .text("NV:")
+ .number("(dd)(dd)(dd) ") // date
+ .number("(dd)(dd)(dd):") // time
+ .number("(-?d+.d+):") // longitude
+ .number("(-?d+.d+):") // latitude
+ .number("(d+.?d*):") // speed
+ .number("(?:NAN|(d+.?d*)):") // accuracy
+ .number("(?:NAN|(d+.?d*)):") // course
+ .number("(?:NAN|(d+.?d*))") // altitude
+ .compile();
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ String sentence = (String) msg;
+
+ if (sentence.startsWith("ID:") || sentence.startsWith("IDRO:")) {
+ getDeviceSession(channel, remoteAddress, sentence.substring(sentence.indexOf(':') + 1));
+ return null;
+ }
+
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);
+ if (deviceSession == null) {
+ return null;
+ }
+
+ Parser parser = new Parser(PATTERN, (String) msg);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setValid(true);
+ position.setLatitude(parser.nextDouble());
+ position.setLongitude(parser.nextDouble());
+ position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble()));
+
+ position.set(Position.KEY_ACCURACY, parser.nextDouble());
+
+ position.setCourse(parser.nextDouble());
+ position.setAltitude(parser.nextDouble());
+
+ return position;
+ }
+
+}
diff --git a/src/org/traccar/protocol/CityeasyProtocol.java b/src/org/traccar/protocol/CityeasyProtocol.java
index 82302d2d7..e22c964ce 100644
--- a/src/org/traccar/protocol/CityeasyProtocol.java
+++ b/src/org/traccar/protocol/CityeasyProtocol.java
@@ -37,7 +37,7 @@ public class CityeasyProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, -4, 0));
diff --git a/src/org/traccar/protocol/CradlepointProtocol.java b/src/org/traccar/protocol/CradlepointProtocol.java
index ec938aa39..9b8de7fb8 100644
--- a/src/org/traccar/protocol/CradlepointProtocol.java
+++ b/src/org/traccar/protocol/CradlepointProtocol.java
@@ -33,7 +33,7 @@ public class CradlepointProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/DishaProtocol.java b/src/org/traccar/protocol/DishaProtocol.java
index bb0d6cdf1..612316112 100644
--- a/src/org/traccar/protocol/DishaProtocol.java
+++ b/src/org/traccar/protocol/DishaProtocol.java
@@ -33,7 +33,7 @@ public class DishaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/EasyTrackProtocol.java b/src/org/traccar/protocol/EasyTrackProtocol.java
index d8bebeb5e..86ec530d4 100644
--- a/src/org/traccar/protocol/EasyTrackProtocol.java
+++ b/src/org/traccar/protocol/EasyTrackProtocol.java
@@ -33,7 +33,7 @@ public class EasyTrackProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/EelinkProtocol.java b/src/org/traccar/protocol/EelinkProtocol.java
index 9579954f8..4da051159 100644
--- a/src/org/traccar/protocol/EelinkProtocol.java
+++ b/src/org/traccar/protocol/EelinkProtocol.java
@@ -31,7 +31,7 @@ public class EelinkProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2));
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 24cd6b570..87d706aff 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -66,31 +66,31 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(Short value) {
switch (value) {
- case 0x01:
- return Position.ALARM_POWER_OFF;
- case 0x02:
- return Position.ALARM_SOS;
- case 0x03:
- return Position.ALARM_LOW_BATTERY;
- case 0x04:
- return Position.ALARM_VIBRATION;
- case 0x08:
- case 0x09:
- return Position.ALARM_GPS_ANTENNA_CUT;
- case 0x81:
- return Position.ALARM_LOW_SPEED;
- case 0x82:
- return Position.ALARM_OVERSPEED;
- case 0x83:
- return Position.ALARM_GEOFENCE_ENTER;
- case 0x84:
- return Position.ALARM_GEOFENCE_EXIT;
- case 0x85:
- return Position.ALARM_ACCIDENT;
- case 0x86:
- return Position.ALARM_FALL_DOWN;
- default:
- return null;
+ case 0x01:
+ return Position.ALARM_POWER_OFF;
+ case 0x02:
+ return Position.ALARM_SOS;
+ case 0x03:
+ return Position.ALARM_LOW_BATTERY;
+ case 0x04:
+ return Position.ALARM_VIBRATION;
+ case 0x08:
+ case 0x09:
+ return Position.ALARM_GPS_ANTENNA_CUT;
+ case 0x81:
+ return Position.ALARM_LOW_SPEED;
+ case 0x82:
+ return Position.ALARM_OVERSPEED;
+ case 0x83:
+ return Position.ALARM_GEOFENCE_ENTER;
+ case 0x84:
+ return Position.ALARM_GEOFENCE_EXIT;
+ case 0x85:
+ return Position.ALARM_ACCIDENT;
+ case 0x86:
+ return Position.ALARM_FALL_DOWN;
+ default:
+ return null;
}
}
@@ -126,7 +126,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
return position;
}
- private Position decodeNew(DeviceSession deviceSession, ChannelBuffer buf, int type, int index) {
+ private Position decodeNew(DeviceSession deviceSession, ChannelBuffer buf, int index) {
Position position = new Position();
position.setDeviceId(deviceSession.getDeviceId());
@@ -206,7 +206,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
if (type == MSG_GPS || type == MSG_ALARM || type == MSG_STATE || type == MSG_SMS) {
return decodeOld(deviceSession, buf, type, index);
} else if (type >= MSG_NORMAL && type <= MSG_OBD_CODE) {
- return decodeNew(deviceSession, buf, type, index);
+ return decodeNew(deviceSession, buf, index);
}
}
diff --git a/src/org/traccar/protocol/EnforaProtocol.java b/src/org/traccar/protocol/EnforaProtocol.java
index 3d8c11fcf..f4ca505ca 100644
--- a/src/org/traccar/protocol/EnforaProtocol.java
+++ b/src/org/traccar/protocol/EnforaProtocol.java
@@ -31,7 +31,7 @@ public class EnforaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 0, 2, -2, 2));
diff --git a/src/org/traccar/protocol/FlextrackProtocol.java b/src/org/traccar/protocol/FlextrackProtocol.java
index c17099fc7..d62c064d0 100644
--- a/src/org/traccar/protocol/FlextrackProtocol.java
+++ b/src/org/traccar/protocol/FlextrackProtocol.java
@@ -33,7 +33,7 @@ public class FlextrackProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\r"));
diff --git a/src/org/traccar/protocol/FoxProtocol.java b/src/org/traccar/protocol/FoxProtocol.java
index bcda1e433..30b76ef25 100644
--- a/src/org/traccar/protocol/FoxProtocol.java
+++ b/src/org/traccar/protocol/FoxProtocol.java
@@ -33,7 +33,7 @@ public class FoxProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "</fox>"));
diff --git a/src/org/traccar/protocol/FreedomProtocol.java b/src/org/traccar/protocol/FreedomProtocol.java
index 2eb510cdb..0176d9781 100644
--- a/src/org/traccar/protocol/FreedomProtocol.java
+++ b/src/org/traccar/protocol/FreedomProtocol.java
@@ -33,7 +33,7 @@ public class FreedomProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/GalileoProtocol.java b/src/org/traccar/protocol/GalileoProtocol.java
index 762bf0075..7d5b47bbb 100644
--- a/src/org/traccar/protocol/GalileoProtocol.java
+++ b/src/org/traccar/protocol/GalileoProtocol.java
@@ -31,7 +31,7 @@ public class GalileoProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new GalileoFrameDecoder());
diff --git a/src/org/traccar/protocol/GatorProtocol.java b/src/org/traccar/protocol/GatorProtocol.java
index 3d899fa1f..e6b7161db 100644
--- a/src/org/traccar/protocol/GatorProtocol.java
+++ b/src/org/traccar/protocol/GatorProtocol.java
@@ -32,14 +32,14 @@ public class GatorProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2));
pipeline.addLast("objectDecoder", new GatorProtocolDecoder(GatorProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new GatorProtocolDecoder(GatorProtocol.this));
diff --git a/src/org/traccar/protocol/Gl100Protocol.java b/src/org/traccar/protocol/Gl100Protocol.java
index f51834ea2..a78aff35f 100644
--- a/src/org/traccar/protocol/Gl100Protocol.java
+++ b/src/org/traccar/protocol/Gl100Protocol.java
@@ -34,7 +34,7 @@ public class Gl100Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\0'));
@@ -43,7 +43,7 @@ public class Gl100Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new Gl100ProtocolDecoder(Gl100Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/Gl200Protocol.java b/src/org/traccar/protocol/Gl200Protocol.java
index 701652e12..d38bdf8a9 100644
--- a/src/org/traccar/protocol/Gl200Protocol.java
+++ b/src/org/traccar/protocol/Gl200Protocol.java
@@ -40,7 +40,7 @@ public class Gl200Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "$", "\0"));
@@ -50,7 +50,7 @@ public class Gl200Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(Gl200Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/GlobalSatProtocol.java b/src/org/traccar/protocol/GlobalSatProtocol.java
index 592ba152e..25d7656f1 100644
--- a/src/org/traccar/protocol/GlobalSatProtocol.java
+++ b/src/org/traccar/protocol/GlobalSatProtocol.java
@@ -33,7 +33,7 @@ public class GlobalSatProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '!'));
diff --git a/src/org/traccar/protocol/GnxProtocol.java b/src/org/traccar/protocol/GnxProtocol.java
index ff2976286..aeef247c2 100644
--- a/src/org/traccar/protocol/GnxProtocol.java
+++ b/src/org/traccar/protocol/GnxProtocol.java
@@ -33,7 +33,7 @@ public class GnxProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\n\r"));
diff --git a/src/org/traccar/protocol/GnxProtocolDecoder.java b/src/org/traccar/protocol/GnxProtocolDecoder.java
index a2ee5ae48..b88d306a8 100644
--- a/src/org/traccar/protocol/GnxProtocolDecoder.java
+++ b/src/org/traccar/protocol/GnxProtocolDecoder.java
@@ -71,13 +71,10 @@ public class GnxProtocolDecoder extends BaseProtocolDecoder {
String type = sentence.substring(5, 8);
Pattern pattern;
- switch (type) {
- case "MIF":
- pattern = PATTERN_MIF;
- break;
- default:
- pattern = PATTERN_OTHER;
- break;
+ if (type.equals("MIF")) {
+ pattern = PATTERN_MIF;
+ } else {
+ pattern = PATTERN_OTHER;
}
Parser parser = new Parser(pattern, sentence);
@@ -115,12 +112,8 @@ public class GnxProtocolDecoder extends BaseProtocolDecoder {
position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
- switch (type) {
- case "MIF":
- position.set(Position.KEY_RFID, parser.next());
- break;
- default:
- break;
+ if (type.equals("MIF")) {
+ position.set(Position.KEY_RFID, parser.next());
}
return position;
diff --git a/src/org/traccar/protocol/GoSafeProtocol.java b/src/org/traccar/protocol/GoSafeProtocol.java
index b45755fc3..54abacd42 100644
--- a/src/org/traccar/protocol/GoSafeProtocol.java
+++ b/src/org/traccar/protocol/GoSafeProtocol.java
@@ -33,7 +33,7 @@ public class GoSafeProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/GotopProtocol.java b/src/org/traccar/protocol/GotopProtocol.java
index 303001756..6b31e1acf 100644
--- a/src/org/traccar/protocol/GotopProtocol.java
+++ b/src/org/traccar/protocol/GotopProtocol.java
@@ -33,7 +33,7 @@ public class GotopProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/Gps103Protocol.java b/src/org/traccar/protocol/Gps103Protocol.java
index 6a2f8a7f9..559de3187 100644
--- a/src/org/traccar/protocol/Gps103Protocol.java
+++ b/src/org/traccar/protocol/Gps103Protocol.java
@@ -44,7 +44,7 @@ public class Gps103Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\r\n", "\n", ";"));
@@ -54,7 +54,7 @@ public class Gps103Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(Gps103Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index af7efa959..363834f89 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -104,20 +104,20 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(String value) {
switch (value) {
- case "tracker":
- return null;
- case "help me":
- return Position.ALARM_SOS;
- case "low battery":
- return Position.ALARM_LOW_BATTERY;
- case "stockade":
- return Position.ALARM_GEOFENCE;
- case "move":
- return Position.ALARM_MOVEMENT;
- case "speed":
- return Position.ALARM_OVERSPEED;
- default:
- return null;
+ case "tracker":
+ return null;
+ case "help me":
+ return Position.ALARM_SOS;
+ case "low battery":
+ return Position.ALARM_LOW_BATTERY;
+ case "stockade":
+ return Position.ALARM_GEOFENCE;
+ case "move":
+ return Position.ALARM_MOVEMENT;
+ case "speed":
+ return Position.ALARM_OVERSPEED;
+ default:
+ return null;
}
}
@@ -216,8 +216,14 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
String alarm = parser.next();
position.set(Position.KEY_ALARM, decodeAlarm(alarm));
- if (channel != null && alarm.equals("help me")) {
- channel.write("**,imei:" + imei + ",E;", remoteAddress);
+ if (alarm.equals("help me")) {
+ if (channel != null) {
+ channel.write("**,imei:" + imei + ",E;", remoteAddress);
+ }
+ } else if (alarm.equals("acc on")) {
+ position.set(Position.KEY_IGNITION, true);
+ } else if (alarm.equals("acc off")) {
+ position.set(Position.KEY_IGNITION, false);
}
DateBuilder dateBuilder = new DateBuilder()
diff --git a/src/org/traccar/protocol/GpsGateProtocol.java b/src/org/traccar/protocol/GpsGateProtocol.java
index bfd3b2883..78a7588ad 100644
--- a/src/org/traccar/protocol/GpsGateProtocol.java
+++ b/src/org/traccar/protocol/GpsGateProtocol.java
@@ -33,7 +33,7 @@ public class GpsGateProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\0", "\n", "\r\n"));
diff --git a/src/org/traccar/protocol/GpsMarkerProtocol.java b/src/org/traccar/protocol/GpsMarkerProtocol.java
index 69c2637bd..bb4b5b561 100644
--- a/src/org/traccar/protocol/GpsMarkerProtocol.java
+++ b/src/org/traccar/protocol/GpsMarkerProtocol.java
@@ -33,7 +33,7 @@ public class GpsMarkerProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\r"));
diff --git a/src/org/traccar/protocol/GpsmtaProtocol.java b/src/org/traccar/protocol/GpsmtaProtocol.java
index d1eaa2fd3..51cce2650 100644
--- a/src/org/traccar/protocol/GpsmtaProtocol.java
+++ b/src/org/traccar/protocol/GpsmtaProtocol.java
@@ -32,7 +32,7 @@ public class GpsmtaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/GranitProtocol.java b/src/org/traccar/protocol/GranitProtocol.java
index fb9d10809..1e097c17b 100644
--- a/src/org/traccar/protocol/GranitProtocol.java
+++ b/src/org/traccar/protocol/GranitProtocol.java
@@ -36,7 +36,7 @@ public class GranitProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new GranitFrameDecoder());
diff --git a/src/org/traccar/protocol/GranitProtocolEncoder.java b/src/org/traccar/protocol/GranitProtocolEncoder.java
index 961f183f5..805bfbe24 100644
--- a/src/org/traccar/protocol/GranitProtocolEncoder.java
+++ b/src/org/traccar/protocol/GranitProtocolEncoder.java
@@ -30,18 +30,18 @@ public class GranitProtocolEncoder extends BaseProtocolEncoder {
String commandString = "";
switch (command.getType()) {
- case Command.TYPE_IDENTIFICATION:
- commandString = "BB+IDNT";
- break;
- case Command.TYPE_REBOOT_DEVICE:
- commandString = "BB+RESET";
- break;
- case Command.TYPE_POSITION_SINGLE:
- commandString = "BB+RRCD";
- break;
- default:
- Log.warning(new UnsupportedOperationException(command.getType()));
- return null;
+ case Command.TYPE_IDENTIFICATION:
+ commandString = "BB+IDNT";
+ break;
+ case Command.TYPE_REBOOT_DEVICE:
+ commandString = "BB+RESET";
+ break;
+ case Command.TYPE_POSITION_SINGLE:
+ commandString = "BB+RRCD";
+ break;
+ default:
+ Log.warning(new UnsupportedOperationException(command.getType()));
+ return null;
}
if (!commandString.isEmpty()) {
ChannelBuffer commandBuf = ChannelBuffers.dynamicBuffer();
diff --git a/src/org/traccar/protocol/Gt02Protocol.java b/src/org/traccar/protocol/Gt02Protocol.java
index e03727b4d..595e6649e 100644
--- a/src/org/traccar/protocol/Gt02Protocol.java
+++ b/src/org/traccar/protocol/Gt02Protocol.java
@@ -31,7 +31,7 @@ public class Gt02Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(256, 2, 1, 2, 0));
diff --git a/src/org/traccar/protocol/Gt06Protocol.java b/src/org/traccar/protocol/Gt06Protocol.java
index 7f6d5d914..e4c9ef2e0 100644
--- a/src/org/traccar/protocol/Gt06Protocol.java
+++ b/src/org/traccar/protocol/Gt06Protocol.java
@@ -34,7 +34,7 @@ public class Gt06Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new Gt06FrameDecoder());
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 3df8a4686..4af814e24 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -165,24 +165,26 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(short value) {
switch (value) {
- case 0x01:
- return Position.ALARM_SOS;
- case 0x03:
- case 0x09:
- return Position.ALARM_VIBRATION;
- case 0x04:
- return Position.ALARM_GEOFENCE_ENTER;
- case 0x05:
- return Position.ALARM_GEOFENCE_EXIT;
- case 0x06:
- return Position.ALARM_OVERSPEED;
- case 0x0E:
- case 0x0F:
- return Position.ALARM_LOW_BATTERY;
- case 0x11:
- return Position.ALARM_POWER_OFF;
- default:
- break;
+ case 0x01:
+ return Position.ALARM_SOS;
+ case 0x02:
+ return Position.ALARM_POWER_CUT;
+ case 0x03:
+ case 0x09:
+ return Position.ALARM_VIBRATION;
+ case 0x04:
+ return Position.ALARM_GEOFENCE_ENTER;
+ case 0x05:
+ return Position.ALARM_GEOFENCE_EXIT;
+ case 0x06:
+ return Position.ALARM_OVERSPEED;
+ case 0x0E:
+ case 0x0F:
+ return Position.ALARM_LOW_BATTERY;
+ case 0x11:
+ return Position.ALARM_POWER_OFF;
+ default:
+ break;
}
return null;
}
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index 3ef9b1313..e78a1b388 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,9 +18,11 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.traccar.BaseProtocolEncoder;
+import org.traccar.Context;
import org.traccar.helper.Checksum;
import org.traccar.helper.Log;
import org.traccar.model.Command;
+import org.traccar.model.Device;
import java.nio.charset.StandardCharsets;
@@ -54,11 +56,19 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
@Override
protected Object encodeCommand(Command command) {
+ boolean alternative;
+ Device device = Context.getIdentityManager().getDeviceById(command.getDeviceId());
+ if (device.getAttributes().containsKey("gt06.alternative")) {
+ alternative = Boolean.parseBoolean((String) device.getAttributes().get("gt06.alternative"));
+ } else {
+ alternative = Context.getConfig().getBoolean("gt06.alternative");
+ }
+
switch (command.getType()) {
case Command.TYPE_ENGINE_STOP:
- return encodeContent("Relay,1#");
+ return encodeContent(alternative ? "DYD,123456#" : "Relay,1#");
case Command.TYPE_ENGINE_RESUME:
- return encodeContent("Relay,0#");
+ return encodeContent(alternative ? "HFYD,123456#" : "Relay,0#");
default:
Log.warning(new UnsupportedOperationException(command.getType()));
break;
diff --git a/src/org/traccar/protocol/H02FrameDecoder.java b/src/org/traccar/protocol/H02FrameDecoder.java
index 79e33c0ca..feba8033d 100644
--- a/src/org/traccar/protocol/H02FrameDecoder.java
+++ b/src/org/traccar/protocol/H02FrameDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,11 @@ import org.jboss.netty.handler.codec.frame.FrameDecoder;
public class H02FrameDecoder extends FrameDecoder {
- private static final int MESSAGE_LENGTH = 32;
+ private int messageLength;
+
+ public H02FrameDecoder(int messageLength) {
+ this.messageLength = messageLength;
+ }
@Override
protected Object decode(
@@ -45,10 +49,10 @@ public class H02FrameDecoder extends FrameDecoder {
return buf.readBytes(index + 1 - buf.readerIndex());
}
- } else if (marker == '$' && buf.readableBytes() >= MESSAGE_LENGTH) {
+ } else if (marker == '$' && buf.readableBytes() >= messageLength) {
// Return binary message
- return buf.readBytes(MESSAGE_LENGTH);
+ return buf.readBytes(messageLength);
}
diff --git a/src/org/traccar/protocol/H02Protocol.java b/src/org/traccar/protocol/H02Protocol.java
index 72b4f903d..06ac2a6fa 100644
--- a/src/org/traccar/protocol/H02Protocol.java
+++ b/src/org/traccar/protocol/H02Protocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
+import org.traccar.Context;
import org.traccar.TrackerServer;
import org.traccar.model.Command;
@@ -39,10 +40,11 @@ public class H02Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("frameDecoder", new H02FrameDecoder());
+ int messageLength = Context.getConfig().getInteger(getName() + ".messageLength", 32);
+ pipeline.addLast("frameDecoder", new H02FrameDecoder(messageLength));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectEncoder", new H02ProtocolEncoder());
pipeline.addLast("objectDecoder", new H02ProtocolDecoder(H02Protocol.this));
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index fc6c9f17c..f876f40bc 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -79,6 +79,23 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_STATUS, status);
}
+ private String decodeBattery(int value) {
+ switch (value) {
+ case 6:
+ return "100%";
+ case 5:
+ return "80%";
+ case 4:
+ return "60%";
+ case 3:
+ return "20%";
+ case 2:
+ return "10%";
+ default:
+ return null;
+ }
+ }
+
private Position decodeBinary(ChannelBuffer buf, Channel channel, SocketAddress remoteAddress) {
Position position = new Position();
@@ -103,7 +120,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
position.setTime(dateBuilder.getDate());
double latitude = readCoordinate(buf, false);
- position.set(Position.KEY_POWER, buf.readByte());
+ position.set(Position.KEY_BATTERY, decodeBattery(buf.readUnsignedByte()));
double longitude = readCoordinate(buf, true);
int flags = buf.readUnsignedByte() & 0x0f;
@@ -129,7 +146,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
.text("*")
.expression("..,") // manufacturer
.number("(d+),") // imei
- .number("Vd,") // version?
+ .expression("[^,]+,")
.any()
.number("(?:(dd)(dd)(dd))?,") // time
.expression("([AV])?,") // validity
@@ -148,6 +165,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
.number("(d+.?d*),") // speed
.number("(d+.?d*)?,") // course
.number("(?:(dd)(dd)(dd))?,") // date (ddmmyy)
+ .any()
.number("(x{8})") // status
.any()
.compile();
diff --git a/src/org/traccar/protocol/HaicomProtocol.java b/src/org/traccar/protocol/HaicomProtocol.java
index 344f9c1ae..71970d476 100644
--- a/src/org/traccar/protocol/HaicomProtocol.java
+++ b/src/org/traccar/protocol/HaicomProtocol.java
@@ -33,7 +33,7 @@ public class HaicomProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '*'));
diff --git a/src/org/traccar/protocol/HomtecsProtocol.java b/src/org/traccar/protocol/HomtecsProtocol.java
index 8e65f8572..e8a86fa37 100644
--- a/src/org/traccar/protocol/HomtecsProtocol.java
+++ b/src/org/traccar/protocol/HomtecsProtocol.java
@@ -32,7 +32,7 @@ public class HomtecsProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
diff --git a/src/org/traccar/protocol/HuaShengProtocol.java b/src/org/traccar/protocol/HuaShengProtocol.java
index 53a77c603..dcef2bd69 100644
--- a/src/org/traccar/protocol/HuaShengProtocol.java
+++ b/src/org/traccar/protocol/HuaShengProtocol.java
@@ -30,7 +30,7 @@ public class HuaShengProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new HuaShengFrameDecoder());
diff --git a/src/org/traccar/protocol/HuabaoProtocol.java b/src/org/traccar/protocol/HuabaoProtocol.java
index 9f41bb8c6..4a83689e3 100644
--- a/src/org/traccar/protocol/HuabaoProtocol.java
+++ b/src/org/traccar/protocol/HuabaoProtocol.java
@@ -30,7 +30,7 @@ public class HuabaoProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new HuabaoFrameDecoder());
diff --git a/src/org/traccar/protocol/HunterProProtocol.java b/src/org/traccar/protocol/HunterProProtocol.java
index 1eb7d1a42..502a95e11 100644
--- a/src/org/traccar/protocol/HunterProProtocol.java
+++ b/src/org/traccar/protocol/HunterProProtocol.java
@@ -33,7 +33,7 @@ public class HunterProProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\r"));
diff --git a/src/org/traccar/protocol/IdplProtocol.java b/src/org/traccar/protocol/IdplProtocol.java
index c35ae039d..88e106def 100644
--- a/src/org/traccar/protocol/IdplProtocol.java
+++ b/src/org/traccar/protocol/IdplProtocol.java
@@ -33,7 +33,7 @@ public class IdplProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/IntellitracProtocol.java b/src/org/traccar/protocol/IntellitracProtocol.java
index a6caf770f..6db2b0011 100644
--- a/src/org/traccar/protocol/IntellitracProtocol.java
+++ b/src/org/traccar/protocol/IntellitracProtocol.java
@@ -32,7 +32,7 @@ public class IntellitracProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new IntellitracFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/JpKorjarFrameDecoder.java b/src/org/traccar/protocol/JpKorjarFrameDecoder.java
new file mode 100644
index 000000000..33a1b3f36
--- /dev/null
+++ b/src/org/traccar/protocol/JpKorjarFrameDecoder.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2016 Nyash (nyashh@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.channel.Channel;
+import org.jboss.netty.channel.ChannelHandlerContext;
+import org.jboss.netty.handler.codec.frame.FrameDecoder;
+
+public class JpKorjarFrameDecoder extends FrameDecoder {
+
+ @Override
+ protected Object decode(
+ ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
+
+ if (buf.readableBytes() < 80) {
+ return null;
+ }
+
+ int spaceIndex = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) ' ');
+ if (spaceIndex == -1) {
+ return null;
+ }
+
+ int endIndex = buf.indexOf(spaceIndex, buf.writerIndex(), (byte) ',');
+ if (endIndex == -1) {
+ return null;
+ }
+
+ return buf.readBytes(endIndex + 1);
+ }
+
+}
diff --git a/src/org/traccar/protocol/JpKorjarProtocol.java b/src/org/traccar/protocol/JpKorjarProtocol.java
new file mode 100644
index 000000000..c54994708
--- /dev/null
+++ b/src/org/traccar/protocol/JpKorjarProtocol.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 Nyash (nyashh@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.string.StringDecoder;
+import org.traccar.BaseProtocol;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class JpKorjarProtocol extends BaseProtocol {
+
+ public JpKorjarProtocol() {
+ super("jpkorjar");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+
+ pipeline.addLast("frameDecoder", new JpKorjarFrameDecoder());
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new JpKorjarProtocolDecoder(JpKorjarProtocol.this));
+ }
+ });
+ }
+
+}
diff --git a/src/org/traccar/protocol/JpKorjarProtocolDecoder.java b/src/org/traccar/protocol/JpKorjarProtocolDecoder.java
new file mode 100644
index 000000000..e0fe0678d
--- /dev/null
+++ b/src/org/traccar/protocol/JpKorjarProtocolDecoder.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2016 Nyash (nyashh@gmail.com)
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
+import org.traccar.helper.DateBuilder;
+import org.traccar.helper.Parser;
+import org.traccar.helper.PatternBuilder;
+import org.traccar.model.Position;
+
+import java.net.SocketAddress;
+import java.util.regex.Pattern;
+
+public class JpKorjarProtocolDecoder extends BaseProtocolDecoder {
+
+ public JpKorjarProtocolDecoder(JpKorjarProtocol protocol) {
+ super(protocol);
+ }
+
+ private static final Pattern PATTERN = new PatternBuilder()
+ .text("KORJAR.PL,")
+ .number("(d+),") // imei
+ .number("(dd)(dd)(dd)") // date
+ .number("(dd)(dd)(dd),") // time
+ .number("(d+.d+)([NS]),") // latitude
+ .number("(d+.d+)([EW]),") // longitude
+ .number("(d+.d+),") // speed
+ .number("(d+),") // course
+ .number("[FL]:(d+.d+)V,") // battery
+ .number("([01]) ") // valid
+ .number("(d+) ") // mcc
+ .number("(d+) ") // mnc
+ .number("(x+) ") // lac
+ .number("(x+),") // cid
+ .compile();
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ Parser parser = new Parser(PATTERN, (String) msg);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ if (deviceSession == null) {
+ return null;
+ }
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
+ position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
+ position.setSpeed(parser.nextDouble());
+ position.setCourse(parser.nextDouble());
+
+ position.set(Position.KEY_BATTERY, parser.nextDouble());
+
+ position.setValid(parser.nextInt() == 1);
+
+ position.set(Position.KEY_MCC, parser.nextInt());
+ position.set(Position.KEY_MNC, parser.nextInt());
+ position.set(Position.KEY_LAC, parser.nextInt(16));
+ position.set(Position.KEY_CID, parser.nextInt(16));
+
+ return position;
+ }
+
+}
diff --git a/src/org/traccar/protocol/Jt600Protocol.java b/src/org/traccar/protocol/Jt600Protocol.java
index 3207986bf..2df792b47 100644
--- a/src/org/traccar/protocol/Jt600Protocol.java
+++ b/src/org/traccar/protocol/Jt600Protocol.java
@@ -30,7 +30,7 @@ public class Jt600Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new Jt600FrameDecoder());
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index b7193d24b..b30bd7b85 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
return degrees + minutes / 60;
}
- private Position decodeNormalMessage(ChannelBuffer buf, Channel channel, SocketAddress remoteAddress) {
+ private Position decodeBinary(ChannelBuffer buf, Channel channel, SocketAddress remoteAddress) {
Position position = new Position();
position.setProtocol(getProtocolName());
@@ -120,7 +120,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
return position;
}
- private static final Pattern PATTERN = new PatternBuilder()
+ private static final Pattern PATTERN_W01 = new PatternBuilder()
.text("(")
.number("(d+),") // id
.text("W01,") // type
@@ -138,25 +138,22 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
.number("(d+),") // gsm signal
.number("(d+),") // alert type
.any()
- .text(")")
.compile();
- private Position decodeAlertMessage(ChannelBuffer buf, Channel channel, SocketAddress remoteAddress) {
+ private Position decodeW01(String sentence, Channel channel, SocketAddress remoteAddress) {
- Parser parser = new Parser(PATTERN, buf.toString(StandardCharsets.US_ASCII));
+ Parser parser = new Parser(PATTERN_W01, sentence);
if (!parser.matches()) {
return null;
}
- Position position = new Position();
- position.setProtocol(getProtocolName());
-
- position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);
-
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
if (deviceSession == null) {
return null;
}
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
position.setLongitude(parser.nextCoordinate());
@@ -176,6 +173,68 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
return position;
}
+ private static final Pattern PATTERN_U01 = new PatternBuilder()
+ .text("(")
+ .number("(d+),") // id
+ .number("Udd,") // type
+ .number("d+,").optional() // alarm
+ .number("(dd)(dd)(dd),") // date (ddmmyy)
+ .number("(dd)(dd)(dd),") // time
+ .expression("([TF]),") // validity
+ .number("(d+.d+),([NS]),") // latitude
+ .number("(d+.d+),([EW]),") // longitude
+ .number("(d+.?d*),") // speed
+ .number("(d+),") // course
+ .number("(d+),") // satellites
+ .number("(d+%),") // battery
+ .expression("([01]+),") // status
+ .number("(d+),") // cid
+ .number("(d+),") // lac
+ .number("(d+),") // gsm signal
+ .number("(d+),") // odometer
+ .number("(d+)") // index
+ .any()
+ .compile();
+
+ private Position decodeU01(String sentence, Channel channel, SocketAddress remoteAddress) {
+
+ Parser parser = new Parser(PATTERN_U01, sentence);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
+ if (deviceSession == null) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setValid(parser.next().equals("T"));
+ position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
+ position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));
+
+ position.setSpeed(UnitsConverter.knotsFromMph(parser.nextDouble()));
+ position.setCourse(parser.nextDouble());
+
+ position.set(Position.KEY_SATELLITES, parser.nextInt());
+ position.set(Position.KEY_BATTERY, parser.next());
+ position.set(Position.KEY_STATUS, parser.nextInt(2));
+ position.set(Position.KEY_CID, parser.nextInt());
+ position.set(Position.KEY_LAC, parser.nextInt());
+ position.set(Position.KEY_GSM, parser.nextInt());
+ position.set(Position.KEY_ODOMETER, parser.nextLong() * 1000);
+ position.set(Position.KEY_INDEX, parser.nextInt());
+
+ return position;
+ }
@Override
protected Object decode(
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
@@ -184,9 +243,14 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
char first = (char) buf.getByte(0);
if (first == '$') {
- return decodeNormalMessage(buf, channel, remoteAddress);
+ return decodeBinary(buf, channel, remoteAddress);
} else if (first == '(') {
- return decodeAlertMessage(buf, channel, remoteAddress);
+ String sentence = buf.toString(StandardCharsets.US_ASCII);
+ if (sentence.contains("W01")) {
+ return decodeW01(sentence, channel, remoteAddress);
+ } else {
+ return decodeU01(sentence, channel, remoteAddress);
+ }
}
return null;
diff --git a/src/org/traccar/protocol/KhdProtocol.java b/src/org/traccar/protocol/KhdProtocol.java
index 93edb0415..e5bcc1be3 100644
--- a/src/org/traccar/protocol/KhdProtocol.java
+++ b/src/org/traccar/protocol/KhdProtocol.java
@@ -35,7 +35,7 @@ public class KhdProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(512, 3, 2));
diff --git a/src/org/traccar/protocol/L100Protocol.java b/src/org/traccar/protocol/L100Protocol.java
index 95a4dce68..418b9beb7 100644
--- a/src/org/traccar/protocol/L100Protocol.java
+++ b/src/org/traccar/protocol/L100Protocol.java
@@ -30,7 +30,7 @@ public class L100Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new L100FrameDecoder());
diff --git a/src/org/traccar/protocol/LaipacProtocol.java b/src/org/traccar/protocol/LaipacProtocol.java
index c2e5c585e..f64204749 100644
--- a/src/org/traccar/protocol/LaipacProtocol.java
+++ b/src/org/traccar/protocol/LaipacProtocol.java
@@ -33,7 +33,7 @@ public class LaipacProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/M2mProtocol.java b/src/org/traccar/protocol/M2mProtocol.java
index 1fac9118c..662aa3f0f 100644
--- a/src/org/traccar/protocol/M2mProtocol.java
+++ b/src/org/traccar/protocol/M2mProtocol.java
@@ -31,7 +31,7 @@ public class M2mProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new FixedLengthFrameDecoder(23));
diff --git a/src/org/traccar/protocol/ManPowerProtocol.java b/src/org/traccar/protocol/ManPowerProtocol.java
index 647a1bea7..ce7045899 100644
--- a/src/org/traccar/protocol/ManPowerProtocol.java
+++ b/src/org/traccar/protocol/ManPowerProtocol.java
@@ -33,7 +33,7 @@ public class ManPowerProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ';'));
diff --git a/src/org/traccar/protocol/MegastekProtocol.java b/src/org/traccar/protocol/MegastekProtocol.java
index f61a4443c..77c2510bd 100644
--- a/src/org/traccar/protocol/MegastekProtocol.java
+++ b/src/org/traccar/protocol/MegastekProtocol.java
@@ -32,7 +32,7 @@ public class MegastekProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new MegastekFrameDecoder());
diff --git a/src/org/traccar/protocol/MegastekProtocolDecoder.java b/src/org/traccar/protocol/MegastekProtocolDecoder.java
index a330947b1..3ea76536c 100644
--- a/src/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -343,31 +343,31 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(String value) {
switch (value) {
- case "SOS":
- case "Help":
- return Position.ALARM_SOS;
- case "Over Speed":
- case "OverSpeed":
- return Position.ALARM_OVERSPEED;
- case "LowSpeed":
- return Position.ALARM_LOW_SPEED;
- case "Low Battery":
- case "LowBattery":
- return Position.ALARM_LOW_BATTERY;
- case "VIB":
- return Position.ALARM_VIBRATION;
- case "Move in":
- case "Geo in":
- case "Geo1 in":
- case "Geo2 in":
- return Position.ALARM_GEOFENCE_ENTER;
- case "Move out":
- case "Geo out":
- case "Geo1 out":
- case "Geo2 out":
- return Position.ALARM_GEOFENCE_EXIT;
- default:
- return null;
+ case "SOS":
+ case "Help":
+ return Position.ALARM_SOS;
+ case "Over Speed":
+ case "OverSpeed":
+ return Position.ALARM_OVERSPEED;
+ case "LowSpeed":
+ return Position.ALARM_LOW_SPEED;
+ case "Low Battery":
+ case "LowBattery":
+ return Position.ALARM_LOW_BATTERY;
+ case "VIB":
+ return Position.ALARM_VIBRATION;
+ case "Move in":
+ case "Geo in":
+ case "Geo1 in":
+ case "Geo2 in":
+ return Position.ALARM_GEOFENCE_ENTER;
+ case "Move out":
+ case "Geo out":
+ case "Geo1 out":
+ case "Geo2 out":
+ return Position.ALARM_GEOFENCE_EXIT;
+ default:
+ return null;
}
}
diff --git a/src/org/traccar/protocol/MeiligaoProtocol.java b/src/org/traccar/protocol/MeiligaoProtocol.java
index bce9b3196..2c61af5cb 100644
--- a/src/org/traccar/protocol/MeiligaoProtocol.java
+++ b/src/org/traccar/protocol/MeiligaoProtocol.java
@@ -40,7 +40,7 @@ public class MeiligaoProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new MeiligaoFrameDecoder());
@@ -48,7 +48,7 @@ public class MeiligaoProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(MeiligaoProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectEncoder", new MeiligaoProtocolEncoder());
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index 41e248791..f0e5032b4 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -80,6 +80,24 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
.expression("([EW])")
.compile();
+ private static final Pattern PATTERN_OBD = new PatternBuilder()
+ .number("(d+.d+),") // battery
+ .number("(d+),") // rpm
+ .number("(d+),") // speed
+ .number("(d+.d+),") // throttle
+ .number("(d+.d+),") // engine load
+ .number("(-?d+),") // coolant temp
+ .number("d+.d+,") // instantaneous fuel
+ .number("(d+.d+),") // average fuel
+ .number("(d+.d+),") // driving range
+ .number("(d+.?d*),") // odometer
+ .number("(d+.d+),")
+ .number("(d+.d+),")
+ .number("(d+),") // error code count
+ .number("d+,") // harsh acceleration count
+ .number("d+") // harsh break count
+ .compile();
+
public static final int MSG_HEARTBEAT = 0x0001;
public static final int MSG_SERVER = 0x0002;
public static final int MSG_LOGIN = 0x5000;
@@ -91,6 +109,8 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_RFID = 0x9966;
+ public static final int MSG_OBD_RT = 0x9901;
+
private DeviceSession identify(ChannelBuffer buf, Channel channel, SocketAddress remoteAddress) {
StringBuilder builder = new StringBuilder();
@@ -142,7 +162,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
}
}
- private String getMeiligaoServer(Channel channel) {
+ private String getServer(Channel channel) {
String server = Context.getConfig().getString(getProtocolName() + ".server");
if (server == null) {
InetSocketAddress address = (InetSocketAddress) channel.getLocalAddress();
@@ -153,23 +173,123 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(short value) {
switch (value) {
- case 0x01:
- return Position.ALARM_SOS;
- case 0x10:
- return Position.ALARM_LOW_BATTERY;
- case 0x11:
- return Position.ALARM_OVERSPEED;
- case 0x12:
- return Position.ALARM_MOVEMENT;
- case 0x13:
- return Position.ALARM_GEOFENCE_ENTER;
- case 0x50:
- return Position.ALARM_POWER_OFF;
- case 0x53:
- return Position.ALARM_GPS_ANTENNA_CUT;
- default:
+ case 0x01:
+ return Position.ALARM_SOS;
+ case 0x10:
+ return Position.ALARM_LOW_BATTERY;
+ case 0x11:
+ return Position.ALARM_OVERSPEED;
+ case 0x12:
+ return Position.ALARM_MOVEMENT;
+ case 0x13:
+ return Position.ALARM_GEOFENCE_ENTER;
+ case 0x50:
+ return Position.ALARM_POWER_OFF;
+ case 0x53:
+ return Position.ALARM_GPS_ANTENNA_CUT;
+ default:
+ return null;
+ }
+ }
+
+ private Position decodeRegular(Position position, String sentence) {
+ Parser parser = new Parser(PATTERN, sentence);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ if (parser.hasNext()) {
+ dateBuilder.setMillis(parser.nextInt());
+ }
+
+ position.setValid(parser.next().equals("A"));
+ position.setLatitude(parser.nextCoordinate());
+ position.setLongitude(parser.nextCoordinate());
+
+ if (parser.hasNext()) {
+ position.setSpeed(parser.nextDouble());
+ }
+
+ if (parser.hasNext()) {
+ position.setCourse(parser.nextDouble());
+ }
+
+ dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.set(Position.KEY_HDOP, parser.next());
+
+ if (parser.hasNext()) {
+ position.setAltitude(parser.nextDouble());
+ }
+
+ position.set(Position.KEY_STATUS, parser.next());
+
+ for (int i = 1; i <= 8; i++) {
+ if (parser.hasNext()) {
+ position.set(Position.PREFIX_ADC + i, parser.nextInt(16));
+ }
+ }
+
+ if (parser.hasNext()) {
+ position.set(Position.KEY_GSM, parser.nextInt(16));
+ }
+
+ if (parser.hasNext()) {
+ position.set(Position.KEY_ODOMETER, parser.nextLong(16));
+ }
+ if (parser.hasNext()) {
+ position.set(Position.KEY_ODOMETER, parser.nextLong(16));
+ }
+
+ if (parser.hasNext()) {
+ position.set(Position.KEY_RFID, parser.nextInt(16));
+ }
+
+ return position;
+ }
+
+ private Position decodeRfid(Position position, String sentence) {
+ Parser parser = new Parser(PATTERN_RFID, sentence);
+ if (!parser.matches()) {
return null;
}
+
+ DateBuilder dateBuilder = new DateBuilder()
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setTime(dateBuilder.getDate());
+
+ position.setValid(true);
+ position.setLatitude(parser.nextCoordinate());
+ position.setLongitude(parser.nextCoordinate());
+
+ return position;
+ }
+
+ private Position decodeObd(Position position, String sentence) {
+ Parser parser = new Parser(PATTERN_OBD, sentence);
+ if (!parser.matches()) {
+ return null;
+ }
+
+ getLastLocation(position, null);
+
+ position.set(Position.KEY_BATTERY, parser.nextDouble());
+ position.set(Position.KEY_RPM, parser.nextInt());
+ position.set(Position.KEY_OBD_SPEED, parser.nextInt());
+ position.set(Position.KEY_THROTTLE, parser.nextDouble());
+ position.set("engineLoad", parser.nextDouble());
+ position.set(Position.PREFIX_TEMP + 1, parser.nextInt());
+ position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble());
+ position.set("drivingRange", parser.nextDouble() * 1000);
+ position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
+ position.set("singleFuelConsumption", parser.nextDouble());
+ position.set("totalFuelConsumption", parser.nextDouble());
+
+ return position;
}
@Override
@@ -183,39 +303,25 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
int command = buf.readUnsignedShort();
ChannelBuffer response;
- switch (command) {
- case MSG_LOGIN:
- if (channel != null) {
- response = ChannelBuffers.wrappedBuffer(new byte[] {0x01});
- sendResponse(channel, remoteAddress, id, MSG_LOGIN_RESPONSE, response);
- }
+ if (channel != null) {
+ if (command == MSG_LOGIN) {
+ response = ChannelBuffers.wrappedBuffer(new byte[] {0x01});
+ sendResponse(channel, remoteAddress, id, MSG_LOGIN_RESPONSE, response);
return null;
- case MSG_HEARTBEAT:
- if (channel != null) {
- response = ChannelBuffers.wrappedBuffer(new byte[] {0x01});
- sendResponse(channel, remoteAddress, id, MSG_HEARTBEAT, response);
- }
+ } else if (command == MSG_HEARTBEAT) {
+ response = ChannelBuffers.wrappedBuffer(new byte[] {0x01});
+ sendResponse(channel, remoteAddress, id, MSG_HEARTBEAT, response);
return null;
- case MSG_SERVER:
- if (channel != null) {
- response = ChannelBuffers.copiedBuffer(
- getMeiligaoServer(channel), StandardCharsets.US_ASCII);
- sendResponse(channel, remoteAddress, id, MSG_SERVER, response);
- }
- return null;
- case MSG_POSITION:
- case MSG_POSITION_LOGGED:
- case MSG_ALARM:
- case MSG_RFID:
- break;
- default:
+ } else if (command == MSG_SERVER) {
+ response = ChannelBuffers.copiedBuffer(getServer(channel), StandardCharsets.US_ASCII);
+ sendResponse(channel, remoteAddress, id, MSG_SERVER, response);
return null;
+ }
}
Position position = new Position();
position.setProtocol(getProtocolName());
- // Custom data
if (command == MSG_ALARM) {
position.set(Position.KEY_ALARM, decodeAlarm(buf.readUnsignedByte()));
} else if (command == MSG_POSITION_LOGGED) {
@@ -239,85 +345,17 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
}
}
- Pattern pattern;
- if (command == MSG_RFID) {
- pattern = PATTERN_RFID;
- } else {
- pattern = PATTERN;
- }
-
- Parser parser = new Parser(
- pattern, buf.toString(buf.readerIndex(), buf.readableBytes() - 4, StandardCharsets.US_ASCII));
- if (!parser.matches()) {
- return null;
- }
-
- if (command == MSG_RFID) {
-
- DateBuilder dateBuilder = new DateBuilder()
- .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt())
- .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
- position.setTime(dateBuilder.getDate());
-
- position.setValid(true);
- position.setLatitude(parser.nextCoordinate());
- position.setLongitude(parser.nextCoordinate());
-
- } else {
-
- DateBuilder dateBuilder = new DateBuilder()
- .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
- if (parser.hasNext()) {
- dateBuilder.setMillis(parser.nextInt());
- }
-
- position.setValid(parser.next().equals("A"));
- position.setLatitude(parser.nextCoordinate());
- position.setLongitude(parser.nextCoordinate());
-
- if (parser.hasNext()) {
- position.setSpeed(parser.nextDouble());
- }
-
- if (parser.hasNext()) {
- position.setCourse(parser.nextDouble());
- }
-
- dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
- position.setTime(dateBuilder.getDate());
-
- position.set(Position.KEY_HDOP, parser.next());
-
- if (parser.hasNext()) {
- position.setAltitude(parser.nextDouble());
- }
-
- position.set(Position.KEY_STATUS, parser.next());
-
- for (int i = 1; i <= 8; i++) {
- if (parser.hasNext()) {
- position.set(Position.PREFIX_ADC + i, parser.nextInt(16));
- }
- }
-
- if (parser.hasNext()) {
- position.set(Position.KEY_GSM, parser.nextInt(16));
- }
-
- if (parser.hasNext()) {
- position.set(Position.KEY_ODOMETER, parser.nextLong(16));
- }
- if (parser.hasNext()) {
- position.set(Position.KEY_ODOMETER, parser.nextLong(16));
- }
-
- if (parser.hasNext()) {
- position.set(Position.KEY_RFID, parser.nextInt(16));
- }
+ String sentence = buf.toString(buf.readerIndex(), buf.readableBytes() - 4, StandardCharsets.US_ASCII);
+ if (command == MSG_POSITION || command == MSG_POSITION_LOGGED || command == MSG_ALARM) {
+ return decodeRegular(position, sentence);
+ } else if (command == MSG_RFID) {
+ return decodeRfid(position, sentence);
+ } else if (command == MSG_OBD_RT) {
+ return decodeObd(position, sentence);
}
- return position;
+ return null;
}
}
diff --git a/src/org/traccar/protocol/MeitrackProtocol.java b/src/org/traccar/protocol/MeitrackProtocol.java
index 01fdcc08c..0c85c6203 100644
--- a/src/org/traccar/protocol/MeitrackProtocol.java
+++ b/src/org/traccar/protocol/MeitrackProtocol.java
@@ -42,7 +42,7 @@ public class MeitrackProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new MeitrackFrameDecoder());
@@ -53,7 +53,7 @@ public class MeitrackProtocol extends BaseProtocol {
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
- server = new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/MiniFinderProtocol.java b/src/org/traccar/protocol/MiniFinderProtocol.java
index 8da621ee4..605633267 100644
--- a/src/org/traccar/protocol/MiniFinderProtocol.java
+++ b/src/org/traccar/protocol/MiniFinderProtocol.java
@@ -44,7 +44,7 @@ public class MiniFinderProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ';'));
diff --git a/src/org/traccar/protocol/Mta6Protocol.java b/src/org/traccar/protocol/Mta6Protocol.java
index ed578b2d7..cafda2bc6 100644
--- a/src/org/traccar/protocol/Mta6Protocol.java
+++ b/src/org/traccar/protocol/Mta6Protocol.java
@@ -33,7 +33,7 @@ public class Mta6Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
diff --git a/src/org/traccar/protocol/MtxProtocol.java b/src/org/traccar/protocol/MtxProtocol.java
index e0bef8350..c549653d0 100644
--- a/src/org/traccar/protocol/MtxProtocol.java
+++ b/src/org/traccar/protocol/MtxProtocol.java
@@ -33,7 +33,7 @@ public class MtxProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/MxtProtocol.java b/src/org/traccar/protocol/MxtProtocol.java
index 95223932c..a5d21e445 100644
--- a/src/org/traccar/protocol/MxtProtocol.java
+++ b/src/org/traccar/protocol/MxtProtocol.java
@@ -31,7 +31,7 @@ public class MxtProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new MxtFrameDecoder());
diff --git a/src/org/traccar/protocol/NavigilProtocol.java b/src/org/traccar/protocol/NavigilProtocol.java
index 6d64761fc..7cf6f35ff 100644
--- a/src/org/traccar/protocol/NavigilProtocol.java
+++ b/src/org/traccar/protocol/NavigilProtocol.java
@@ -31,7 +31,7 @@ public class NavigilProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new NavigilFrameDecoder());
diff --git a/src/org/traccar/protocol/NavisProtocol.java b/src/org/traccar/protocol/NavisProtocol.java
index 691a3d08c..d4cf40f1f 100644
--- a/src/org/traccar/protocol/NavisProtocol.java
+++ b/src/org/traccar/protocol/NavisProtocol.java
@@ -32,7 +32,7 @@ public class NavisProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(4 * 1024, 12, 2, 2, 0));
diff --git a/src/org/traccar/protocol/NoranProtocol.java b/src/org/traccar/protocol/NoranProtocol.java
index 6bc15296e..eeddbdead 100644
--- a/src/org/traccar/protocol/NoranProtocol.java
+++ b/src/org/traccar/protocol/NoranProtocol.java
@@ -38,7 +38,7 @@ public class NoranProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectEncoder", new NoranProtocolEncoder());
diff --git a/src/org/traccar/protocol/NoranProtocolDecoder.java b/src/org/traccar/protocol/NoranProtocolDecoder.java
index aaecfc1db..e062a9907 100644
--- a/src/org/traccar/protocol/NoranProtocolDecoder.java
+++ b/src/org/traccar/protocol/NoranProtocolDecoder.java
@@ -92,20 +92,20 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder {
short alarm = buf.readUnsignedByte();
switch (alarm) {
- case 1:
- position.set(Position.KEY_ALARM, Position.ALARM_SOS);
- break;
- case 2:
- position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED);
- break;
- case 3:
- position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE_EXIT);
- break;
- case 9:
- position.set(Position.KEY_ALARM, Position.ALARM_POWER_OFF);
- break;
- default:
- break;
+ case 1:
+ position.set(Position.KEY_ALARM, Position.ALARM_SOS);
+ break;
+ case 2:
+ position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED);
+ break;
+ case 3:
+ position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE_EXIT);
+ break;
+ case 9:
+ position.set(Position.KEY_ALARM, Position.ALARM_POWER_OFF);
+ break;
+ default:
+ break;
}
if (newFormat) {
diff --git a/src/org/traccar/protocol/NvsProtocol.java b/src/org/traccar/protocol/NvsProtocol.java
index 9236668d2..4610e4abc 100644
--- a/src/org/traccar/protocol/NvsProtocol.java
+++ b/src/org/traccar/protocol/NvsProtocol.java
@@ -30,7 +30,7 @@ public class NvsProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new NvsFrameDecoder());
diff --git a/src/org/traccar/protocol/ObdDongleProtocol.java b/src/org/traccar/protocol/ObdDongleProtocol.java
index e87f9a99a..d91eb765a 100644
--- a/src/org/traccar/protocol/ObdDongleProtocol.java
+++ b/src/org/traccar/protocol/ObdDongleProtocol.java
@@ -31,7 +31,7 @@ public class ObdDongleProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1099, 20, 2, 3, 0));
diff --git a/src/org/traccar/protocol/OigoProtocol.java b/src/org/traccar/protocol/OigoProtocol.java
new file mode 100644
index 000000000..c60ee1be6
--- /dev/null
+++ b/src/org/traccar/protocol/OigoProtocol.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.traccar.BaseProtocol;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class OigoProtocol extends BaseProtocol {
+
+ public OigoProtocol() {
+ super("oigo");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectDecoder", new OigoProtocolDecoder(OigoProtocol.this));
+ }
+ });
+ }
+
+}
diff --git a/src/org/traccar/protocol/OigoProtocolDecoder.java b/src/org/traccar/protocol/OigoProtocolDecoder.java
new file mode 100644
index 000000000..bbea38183
--- /dev/null
+++ b/src/org/traccar/protocol/OigoProtocolDecoder.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.jboss.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.DeviceSession;
+import org.traccar.helper.BitUtil;
+import org.traccar.helper.DateBuilder;
+import org.traccar.helper.UnitsConverter;
+import org.traccar.model.Position;
+
+import java.net.SocketAddress;
+import java.nio.charset.StandardCharsets;
+
+public class OigoProtocolDecoder extends BaseProtocolDecoder {
+
+ public OigoProtocolDecoder(OigoProtocol protocol) {
+ super(protocol);
+ }
+
+ public static final int MSG_LOCATION = 0x00;
+ public static final int MSG_REMOTE_START = 0x10;
+ public static final int MSG_ACKNOWLEDGEMENT = 0xE0;
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+
+ ChannelBuffer buf = (ChannelBuffer) msg;
+
+ buf.skipBytes(1); // header
+ buf.readUnsignedShort(); // length
+
+ int type = buf.readUnsignedByte();
+
+ int tag = buf.readUnsignedByte();
+
+ DeviceSession deviceSession;
+ switch (BitUtil.to(tag, 3)) {
+ case 0:
+ String imei = ChannelBuffers.hexDump(buf.readBytes(8)).substring(1);
+ deviceSession = getDeviceSession(channel, remoteAddress, imei);
+ break;
+ case 1:
+ buf.skipBytes(1);
+ String meid = buf.readBytes(14).toString(StandardCharsets.US_ASCII);
+ deviceSession = getDeviceSession(channel, remoteAddress, meid);
+ break;
+ default:
+ deviceSession = getDeviceSession(channel, remoteAddress);
+ break;
+ }
+
+ if (deviceSession == null || type != MSG_LOCATION) {
+ return null;
+ }
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ position.set(Position.KEY_EVENT, buf.readUnsignedByte());
+
+ int mask = buf.readInt();
+
+ if (BitUtil.check(mask, 0)) {
+ position.set(Position.KEY_INDEX, buf.readUnsignedShort());
+ }
+
+ if (BitUtil.check(mask, 1)) {
+ int date = buf.readUnsignedByte();
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDate(BitUtil.between(date, 4, 8) + 2010, BitUtil.to(date, 4), buf.readUnsignedByte())
+ .setTime(buf.readUnsignedByte(), buf.readUnsignedByte(), buf.readUnsignedByte());
+ position.setTime(dateBuilder.getDate());
+ }
+
+ if (BitUtil.check(mask, 2)) {
+ buf.skipBytes(5); // device time
+ }
+
+ if (BitUtil.check(mask, 3)) {
+ position.setLatitude(buf.readUnsignedInt() * 0.000001 - 90);
+ position.setLongitude(buf.readUnsignedInt() * 0.000001 - 180.0);
+ }
+
+ if (BitUtil.check(mask, 4)) {
+ int status = buf.readUnsignedByte();
+ position.setValid(BitUtil.between(status, 4, 8) != 0);
+ position.set(Position.KEY_SATELLITES, BitUtil.to(status, 4));
+ position.set(Position.KEY_HDOP, buf.readUnsignedByte() * 0.1);
+ }
+
+ if (BitUtil.check(mask, 5)) {
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
+ }
+
+ if (BitUtil.check(mask, 6)) {
+ position.setCourse(buf.readUnsignedShort());
+ }
+
+ if (BitUtil.check(mask, 7)) {
+ position.setAltitude(buf.readShort());
+ }
+
+ if (BitUtil.check(mask, 8)) {
+ position.set(Position.KEY_GSM, buf.readUnsignedByte());
+ }
+
+ if (BitUtil.check(mask, 9)) {
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() + "mV");
+ }
+
+ if (BitUtil.check(mask, 10)) {
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() + "mV");
+ }
+
+ if (BitUtil.check(mask, 11)) {
+ buf.skipBytes(2); // gpio
+ }
+
+ if (BitUtil.check(mask, 12)) {
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt() * 1000);
+ }
+
+ if (BitUtil.check(mask, 13)) {
+ buf.skipBytes(6); // software version
+ }
+
+ if (BitUtil.check(mask, 14)) {
+ buf.skipBytes(5); // hardware version
+ }
+
+ if (BitUtil.check(mask, 15)) {
+ buf.readUnsignedShort(); // device config
+ }
+
+ return position;
+ }
+
+}
diff --git a/src/org/traccar/protocol/OrionProtocol.java b/src/org/traccar/protocol/OrionProtocol.java
index 4113c4314..c0166b05d 100644
--- a/src/org/traccar/protocol/OrionProtocol.java
+++ b/src/org/traccar/protocol/OrionProtocol.java
@@ -31,7 +31,7 @@ public class OrionProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new OrionFrameDecoder());
diff --git a/src/org/traccar/protocol/OsmAndProtocol.java b/src/org/traccar/protocol/OsmAndProtocol.java
index 3b473c435..7f5318576 100644
--- a/src/org/traccar/protocol/OsmAndProtocol.java
+++ b/src/org/traccar/protocol/OsmAndProtocol.java
@@ -32,7 +32,7 @@ public class OsmAndProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
diff --git a/src/org/traccar/protocol/PathAwayProtocol.java b/src/org/traccar/protocol/PathAwayProtocol.java
index d7efdfaf6..2583670a2 100644
--- a/src/org/traccar/protocol/PathAwayProtocol.java
+++ b/src/org/traccar/protocol/PathAwayProtocol.java
@@ -32,7 +32,7 @@ public class PathAwayProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
diff --git a/src/org/traccar/protocol/PiligrimProtocol.java b/src/org/traccar/protocol/PiligrimProtocol.java
index 11aafa412..0ab529d5c 100644
--- a/src/org/traccar/protocol/PiligrimProtocol.java
+++ b/src/org/traccar/protocol/PiligrimProtocol.java
@@ -33,7 +33,7 @@ public class PiligrimProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
diff --git a/src/org/traccar/protocol/ProgressProtocol.java b/src/org/traccar/protocol/ProgressProtocol.java
index 35bdf9c9b..3fb702b7b 100644
--- a/src/org/traccar/protocol/ProgressProtocol.java
+++ b/src/org/traccar/protocol/ProgressProtocol.java
@@ -32,7 +32,7 @@ public class ProgressProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 4, 0));
diff --git a/src/org/traccar/protocol/Pt3000Protocol.java b/src/org/traccar/protocol/Pt3000Protocol.java
index 3a22be214..c4cb4129d 100644
--- a/src/org/traccar/protocol/Pt3000Protocol.java
+++ b/src/org/traccar/protocol/Pt3000Protocol.java
@@ -33,7 +33,7 @@ public class Pt3000Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, 'd')); // probably wrong
diff --git a/src/org/traccar/protocol/Pt502Protocol.java b/src/org/traccar/protocol/Pt502Protocol.java
index 1368dd7b7..b609927ac 100644
--- a/src/org/traccar/protocol/Pt502Protocol.java
+++ b/src/org/traccar/protocol/Pt502Protocol.java
@@ -39,7 +39,7 @@ public class Pt502Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new Pt502FrameDecoder());
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index 7dc4fbe5e..24dc2094f 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -91,10 +91,8 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
String type = parser.next();
- if (type.startsWith("PHO")) {
- if (channel != null) {
- channel.write("#PHD0," + type.substring(3) + "\r\n");
- }
+ if (type.startsWith("PHO") && channel != null) {
+ channel.write("#PHD0," + type.substring(3) + "\r\n");
}
position.set(Position.KEY_ALARM, decodeAlarm(type));
diff --git a/src/org/traccar/protocol/RaveonProtocol.java b/src/org/traccar/protocol/RaveonProtocol.java
index 551f1683f..a81d52f0e 100644
--- a/src/org/traccar/protocol/RaveonProtocol.java
+++ b/src/org/traccar/protocol/RaveonProtocol.java
@@ -33,7 +33,7 @@ public class RaveonProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/RitiProtocol.java b/src/org/traccar/protocol/RitiProtocol.java
index e968032ca..8a39c29e1 100644
--- a/src/org/traccar/protocol/RitiProtocol.java
+++ b/src/org/traccar/protocol/RitiProtocol.java
@@ -32,7 +32,7 @@ public class RitiProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 105, 2, 3, 0));
diff --git a/src/org/traccar/protocol/RuptelaProtocol.java b/src/org/traccar/protocol/RuptelaProtocol.java
index d806c4c01..1fe7b02ad 100644
--- a/src/org/traccar/protocol/RuptelaProtocol.java
+++ b/src/org/traccar/protocol/RuptelaProtocol.java
@@ -34,7 +34,7 @@ public class RuptelaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 0, 2, 2, 0));
diff --git a/src/org/traccar/protocol/SanavProtocol.java b/src/org/traccar/protocol/SanavProtocol.java
index bb329ab70..0e7958b8e 100644
--- a/src/org/traccar/protocol/SanavProtocol.java
+++ b/src/org/traccar/protocol/SanavProtocol.java
@@ -33,7 +33,7 @@ public class SanavProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '*'));
diff --git a/src/org/traccar/protocol/SkypatrolProtocol.java b/src/org/traccar/protocol/SkypatrolProtocol.java
index 2791ba082..7d8240294 100644
--- a/src/org/traccar/protocol/SkypatrolProtocol.java
+++ b/src/org/traccar/protocol/SkypatrolProtocol.java
@@ -30,7 +30,7 @@ public class SkypatrolProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new SkypatrolProtocolDecoder(SkypatrolProtocol.this));
diff --git a/src/org/traccar/protocol/Stl060Protocol.java b/src/org/traccar/protocol/Stl060Protocol.java
index e37f94b00..ccdd256d7 100644
--- a/src/org/traccar/protocol/Stl060Protocol.java
+++ b/src/org/traccar/protocol/Stl060Protocol.java
@@ -32,7 +32,7 @@ public class Stl060Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new Stl060FrameDecoder(1024));
diff --git a/src/org/traccar/protocol/SuntechProtocol.java b/src/org/traccar/protocol/SuntechProtocol.java
index 4a40e1bfc..df6109722 100644
--- a/src/org/traccar/protocol/SuntechProtocol.java
+++ b/src/org/traccar/protocol/SuntechProtocol.java
@@ -40,7 +40,7 @@ public class SuntechProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\r'));
diff --git a/src/org/traccar/protocol/SupermateProtocol.java b/src/org/traccar/protocol/SupermateProtocol.java
index bcc2bed16..70c3c00e6 100755
--- a/src/org/traccar/protocol/SupermateProtocol.java
+++ b/src/org/traccar/protocol/SupermateProtocol.java
@@ -33,7 +33,7 @@ public class SupermateProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "#"));
diff --git a/src/org/traccar/protocol/T55Protocol.java b/src/org/traccar/protocol/T55Protocol.java
index 86f927e41..657155042 100644
--- a/src/org/traccar/protocol/T55Protocol.java
+++ b/src/org/traccar/protocol/T55Protocol.java
@@ -34,7 +34,7 @@ public class T55Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
@@ -43,7 +43,7 @@ public class T55Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new T55ProtocolDecoder(T55Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
diff --git a/src/org/traccar/protocol/T800xProtocolDecoder.java b/src/org/traccar/protocol/T800xProtocolDecoder.java
index 8301450d5..d92145e05 100644
--- a/src/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/org/traccar/protocol/T800xProtocolDecoder.java
@@ -62,19 +62,19 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(short value) {
switch (value) {
- case 3:
- return Position.ALARM_SOS;
- case 4:
- return Position.ALARM_OVERSPEED;
- case 5:
- return Position.ALARM_GEOFENCE_ENTER;
- case 6:
- return Position.ALARM_GEOFENCE_EXIT;
- case 8:
- case 10:
- return Position.ALARM_VIBRATION;
- default:
- break;
+ case 3:
+ return Position.ALARM_SOS;
+ case 4:
+ return Position.ALARM_OVERSPEED;
+ case 5:
+ return Position.ALARM_GEOFENCE_ENTER;
+ case 6:
+ return Position.ALARM_GEOFENCE_EXIT;
+ case 8:
+ case 10:
+ return Position.ALARM_VIBRATION;
+ default:
+ break;
}
return null;
}
diff --git a/src/org/traccar/protocol/TaipProtocol.java b/src/org/traccar/protocol/TaipProtocol.java
index e72639099..8b93eb42d 100644
--- a/src/org/traccar/protocol/TaipProtocol.java
+++ b/src/org/traccar/protocol/TaipProtocol.java
@@ -34,7 +34,7 @@ public class TaipProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '<'));
@@ -43,7 +43,7 @@ public class TaipProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new TaipProtocolDecoder(TaipProtocol.this, true));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
diff --git a/src/org/traccar/protocol/TelicProtocol.java b/src/org/traccar/protocol/TelicProtocol.java
index 1e27620ba..b55e16caf 100644
--- a/src/org/traccar/protocol/TelicProtocol.java
+++ b/src/org/traccar/protocol/TelicProtocol.java
@@ -33,7 +33,7 @@ public class TelicProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new TelicFrameDecoder());
diff --git a/src/org/traccar/protocol/TeltonikaProtocol.java b/src/org/traccar/protocol/TeltonikaProtocol.java
index 5a550d4c0..c9c0f0f4d 100644
--- a/src/org/traccar/protocol/TeltonikaProtocol.java
+++ b/src/org/traccar/protocol/TeltonikaProtocol.java
@@ -34,7 +34,7 @@ public class TeltonikaProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new TeltonikaFrameDecoder());
@@ -42,7 +42,7 @@ public class TeltonikaProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new TeltonikaProtocolDecoder(TeltonikaProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectEncoder", new TeltonikaProtocolEncoder());
diff --git a/src/org/traccar/protocol/ThinkRaceProtocol.java b/src/org/traccar/protocol/ThinkRaceProtocol.java
index c9d6c7fc1..add7d33d3 100644
--- a/src/org/traccar/protocol/ThinkRaceProtocol.java
+++ b/src/org/traccar/protocol/ThinkRaceProtocol.java
@@ -31,7 +31,7 @@ public class ThinkRaceProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2 + 12 + 1 + 1, 2, 2, 0));
diff --git a/src/org/traccar/protocol/Tk102Protocol.java b/src/org/traccar/protocol/Tk102Protocol.java
index 1f4eda730..7310d23bd 100644
--- a/src/org/traccar/protocol/Tk102Protocol.java
+++ b/src/org/traccar/protocol/Tk102Protocol.java
@@ -33,7 +33,7 @@ public class Tk102Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ']'));
diff --git a/src/org/traccar/protocol/Tk103Protocol.java b/src/org/traccar/protocol/Tk103Protocol.java
index b14264091..3fe82ad8b 100644
--- a/src/org/traccar/protocol/Tk103Protocol.java
+++ b/src/org/traccar/protocol/Tk103Protocol.java
@@ -34,7 +34,7 @@ public class Tk103Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ')'));
@@ -43,7 +43,7 @@ public class Tk103Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(Tk103Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index 90c80be71..c638e7f27 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -78,20 +78,20 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(int value) {
switch (value) {
- case 1:
- return Position.ALARM_ACCIDENT;
- case 2:
- return Position.ALARM_SOS;
- case 3:
- return Position.ALARM_VIBRATION;
- case 4:
- return Position.ALARM_LOW_SPEED;
- case 5:
- return Position.ALARM_OVERSPEED;
- case 6:
- return Position.ALARM_GEOFENCE_EXIT;
- default:
- return null;
+ case 1:
+ return Position.ALARM_ACCIDENT;
+ case 2:
+ return Position.ALARM_SOS;
+ case 3:
+ return Position.ALARM_VIBRATION;
+ case 4:
+ return Position.ALARM_LOW_SPEED;
+ case 5:
+ return Position.ALARM_OVERSPEED;
+ case 6:
+ return Position.ALARM_GEOFENCE_EXIT;
+ default:
+ return null;
}
}
@@ -111,11 +111,15 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
if (channel != null) {
String id = sentence.substring(0, 12);
String type = sentence.substring(12, 16);
- if (type.equals("BP00")) {
- String content = sentence.substring(sentence.length() - 3);
- channel.write("(" + id + "AP01" + content + ")");
- } else if (type.equals("BP05")) {
- channel.write("(" + id + "AP05)");
+ if (type.equals("BP00") || type.equals("BP05")) {
+ String content = sentence.substring(16);
+ getDeviceSession(channel, remoteAddress, content.substring(0, 15));
+ if (type.equals("BP00")) {
+ channel.write("(" + id + "AP01" + content.substring(15) + ")");
+ return null;
+ } else if (type.equals("BP05")) {
+ channel.write("(" + id + "AP05)");
+ }
}
}
diff --git a/src/org/traccar/protocol/Tlt2hProtocol.java b/src/org/traccar/protocol/Tlt2hProtocol.java
index 3a1bf99ff..e33b1b561 100644
--- a/src/org/traccar/protocol/Tlt2hProtocol.java
+++ b/src/org/traccar/protocol/Tlt2hProtocol.java
@@ -33,7 +33,7 @@ public class Tlt2hProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(32 * 1024, "##\r\n"));
diff --git a/src/org/traccar/protocol/TopflytechProtocol.java b/src/org/traccar/protocol/TopflytechProtocol.java
index ae250ad02..225cb66d7 100644
--- a/src/org/traccar/protocol/TopflytechProtocol.java
+++ b/src/org/traccar/protocol/TopflytechProtocol.java
@@ -33,7 +33,7 @@ public class TopflytechProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ')'));
diff --git a/src/org/traccar/protocol/TotemProtocol.java b/src/org/traccar/protocol/TotemProtocol.java
index e573adcc6..638755b7f 100644
--- a/src/org/traccar/protocol/TotemProtocol.java
+++ b/src/org/traccar/protocol/TotemProtocol.java
@@ -37,7 +37,7 @@ public class TotemProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new TotemFrameDecoder());
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java
index e7a689a8b..fbda41921 100644
--- a/src/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/org/traccar/protocol/TotemProtocolDecoder.java
@@ -161,18 +161,18 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(Short value) {
switch (value) {
- case 0x01:
- return Position.ALARM_SOS;
- case 0x10:
- return Position.ALARM_LOW_BATTERY;
- case 0x11:
- return Position.ALARM_OVERSPEED;
- case 0x42:
- return Position.ALARM_GEOFENCE_EXIT;
- case 0x43:
- return Position.ALARM_GEOFENCE_ENTER;
- default:
- return null;
+ case 0x01:
+ return Position.ALARM_SOS;
+ case 0x10:
+ return Position.ALARM_LOW_BATTERY;
+ case 0x11:
+ return Position.ALARM_OVERSPEED;
+ case 0x42:
+ return Position.ALARM_GEOFENCE_EXIT;
+ case 0x43:
+ return Position.ALARM_GEOFENCE_ENTER;
+ default:
+ return null;
}
}
diff --git a/src/org/traccar/protocol/Tr20Protocol.java b/src/org/traccar/protocol/Tr20Protocol.java
index 4e55d5f98..1c47db86a 100644
--- a/src/org/traccar/protocol/Tr20Protocol.java
+++ b/src/org/traccar/protocol/Tr20Protocol.java
@@ -33,7 +33,7 @@ public class Tr20Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/TrackboxProtocol.java b/src/org/traccar/protocol/TrackboxProtocol.java
index 5477de852..b71eb3810 100644
--- a/src/org/traccar/protocol/TrackboxProtocol.java
+++ b/src/org/traccar/protocol/TrackboxProtocol.java
@@ -33,7 +33,7 @@ public class TrackboxProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/TramigoProtocol.java b/src/org/traccar/protocol/TramigoProtocol.java
index 48892a78e..ea4ea7140 100644
--- a/src/org/traccar/protocol/TramigoProtocol.java
+++ b/src/org/traccar/protocol/TramigoProtocol.java
@@ -31,7 +31,7 @@ public class TramigoProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new TramigoFrameDecoder());
diff --git a/src/org/traccar/protocol/TrvProtocol.java b/src/org/traccar/protocol/TrvProtocol.java
index af598ea02..585cb7cf6 100644
--- a/src/org/traccar/protocol/TrvProtocol.java
+++ b/src/org/traccar/protocol/TrvProtocol.java
@@ -33,7 +33,7 @@ public class TrvProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/Tt8850Protocol.java b/src/org/traccar/protocol/Tt8850Protocol.java
index db41fae9f..5d188de60 100644
--- a/src/org/traccar/protocol/Tt8850Protocol.java
+++ b/src/org/traccar/protocol/Tt8850Protocol.java
@@ -33,7 +33,7 @@ public class Tt8850Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "$"));
diff --git a/src/org/traccar/protocol/TytanProtocol.java b/src/org/traccar/protocol/TytanProtocol.java
index 50918652a..b6608f925 100644
--- a/src/org/traccar/protocol/TytanProtocol.java
+++ b/src/org/traccar/protocol/TytanProtocol.java
@@ -30,7 +30,7 @@ public class TytanProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("objectDecoder", new TytanProtocolDecoder(TytanProtocol.this));
diff --git a/src/org/traccar/protocol/TzoneProtocol.java b/src/org/traccar/protocol/TzoneProtocol.java
index fcf673a57..ca3e490d2 100644
--- a/src/org/traccar/protocol/TzoneProtocol.java
+++ b/src/org/traccar/protocol/TzoneProtocol.java
@@ -31,7 +31,7 @@ public class TzoneProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(256, 2, 2, 2, 0));
diff --git a/src/org/traccar/protocol/TzoneProtocolDecoder.java b/src/org/traccar/protocol/TzoneProtocolDecoder.java
index 4b530efa4..477dc6399 100644
--- a/src/org/traccar/protocol/TzoneProtocolDecoder.java
+++ b/src/org/traccar/protocol/TzoneProtocolDecoder.java
@@ -34,18 +34,18 @@ public class TzoneProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(Short value) {
switch (value) {
- case 0x01:
- return Position.ALARM_SOS;
- case 0x10:
- return Position.ALARM_LOW_BATTERY;
- case 0x11:
- return Position.ALARM_OVERSPEED;
- case 0x42:
- return Position.ALARM_GEOFENCE_EXIT;
- case 0x43:
- return Position.ALARM_GEOFENCE_ENTER;
- default:
- return null;
+ case 0x01:
+ return Position.ALARM_SOS;
+ case 0x10:
+ return Position.ALARM_LOW_BATTERY;
+ case 0x11:
+ return Position.ALARM_OVERSPEED;
+ case 0x42:
+ return Position.ALARM_GEOFENCE_EXIT;
+ case 0x43:
+ return Position.ALARM_GEOFENCE_ENTER;
+ default:
+ return null;
}
}
diff --git a/src/org/traccar/protocol/UlbotechProtocol.java b/src/org/traccar/protocol/UlbotechProtocol.java
index d0413ecbe..ca31dffc9 100644
--- a/src/org/traccar/protocol/UlbotechProtocol.java
+++ b/src/org/traccar/protocol/UlbotechProtocol.java
@@ -30,7 +30,7 @@ public class UlbotechProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new UlbotechFrameDecoder());
diff --git a/src/org/traccar/protocol/UproProtocol.java b/src/org/traccar/protocol/UproProtocol.java
index b62247761..8f940fa15 100644
--- a/src/org/traccar/protocol/UproProtocol.java
+++ b/src/org/traccar/protocol/UproProtocol.java
@@ -33,7 +33,7 @@ public class UproProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/V680Protocol.java b/src/org/traccar/protocol/V680Protocol.java
index 4edff3772..83157790d 100644
--- a/src/org/traccar/protocol/V680Protocol.java
+++ b/src/org/traccar/protocol/V680Protocol.java
@@ -34,7 +34,7 @@ public class V680Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "##"));
@@ -43,7 +43,7 @@ public class V680Protocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new V680ProtocolDecoder(V680Protocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
diff --git a/src/org/traccar/protocol/VisiontekProtocol.java b/src/org/traccar/protocol/VisiontekProtocol.java
index 2d2a41e89..dde906370 100644
--- a/src/org/traccar/protocol/VisiontekProtocol.java
+++ b/src/org/traccar/protocol/VisiontekProtocol.java
@@ -33,7 +33,7 @@ public class VisiontekProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#'));
diff --git a/src/org/traccar/protocol/WatchProtocol.java b/src/org/traccar/protocol/WatchProtocol.java
index 3392e8cbc..8f28916f0 100644
--- a/src/org/traccar/protocol/WatchProtocol.java
+++ b/src/org/traccar/protocol/WatchProtocol.java
@@ -45,7 +45,7 @@ public class WatchProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ']'));
diff --git a/src/org/traccar/protocol/WatchProtocolDecoder.java b/src/org/traccar/protocol/WatchProtocolDecoder.java
index 326552e7f..d74fdbe81 100644
--- a/src/org/traccar/protocol/WatchProtocolDecoder.java
+++ b/src/org/traccar/protocol/WatchProtocolDecoder.java
@@ -25,6 +25,7 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
import java.net.SocketAddress;
+import java.util.Date;
import java.util.regex.Pattern;
public class WatchProtocolDecoder extends BaseProtocolDecoder {
@@ -146,6 +147,18 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
sendResponse(channel, manufacturer, id, "TKQ");
+ } else if (type.equals("PULSE")) {
+
+ Position position = new Position();
+ position.setProtocol(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+ getLastLocation(position, new Date());
+ position.setValid(false);
+ String pulse = content.substring(1);
+ position.set("pulse", pulse);
+ position.set(Position.KEY_RESULT, pulse);
+ return position;
+
}
return null;
diff --git a/src/org/traccar/protocol/WialonProtocol.java b/src/org/traccar/protocol/WialonProtocol.java
index e0255c888..98af6973b 100644
--- a/src/org/traccar/protocol/WialonProtocol.java
+++ b/src/org/traccar/protocol/WialonProtocol.java
@@ -41,7 +41,7 @@ public class WialonProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(4 * 1024));
diff --git a/src/org/traccar/protocol/WialonProtocolEncoder.java b/src/org/traccar/protocol/WialonProtocolEncoder.java
index b68dacd79..d3a0fc3b9 100644
--- a/src/org/traccar/protocol/WialonProtocolEncoder.java
+++ b/src/org/traccar/protocol/WialonProtocolEncoder.java
@@ -25,17 +25,17 @@ public class WialonProtocolEncoder extends StringProtocolEncoder {
@Override
protected Object encodeCommand(Command command) {
switch (command.getType()) {
- case Command.TYPE_REBOOT_DEVICE:
- return formatCommand(command, "reboot\r\n");
- case Command.TYPE_SEND_USSD:
- return formatCommand(command, "USSD:{%s}\r\n", Command.KEY_PHONE);
- case Command.TYPE_IDENTIFICATION:
- return formatCommand(command, "VER?\r\n");
- case Command.TYPE_OUTPUT_CONTROL:
- return formatCommand(command, "L{%s}={%s}\r\n", Command.KEY_INDEX, Command.KEY_DATA);
- default:
- Log.warning(new UnsupportedOperationException(command.getType()));
- break;
+ case Command.TYPE_REBOOT_DEVICE:
+ return formatCommand(command, "reboot\r\n");
+ case Command.TYPE_SEND_USSD:
+ return formatCommand(command, "USSD:{%s}\r\n", Command.KEY_PHONE);
+ case Command.TYPE_IDENTIFICATION:
+ return formatCommand(command, "VER?\r\n");
+ case Command.TYPE_OUTPUT_CONTROL:
+ return formatCommand(command, "L{%s}={%s}\r\n", Command.KEY_INDEX, Command.KEY_DATA);
+ default:
+ Log.warning(new UnsupportedOperationException(command.getType()));
+ break;
}
return null;
}
diff --git a/src/org/traccar/protocol/WondexProtocol.java b/src/org/traccar/protocol/WondexProtocol.java
index 78e090f03..54b39a5c4 100644
--- a/src/org/traccar/protocol/WondexProtocol.java
+++ b/src/org/traccar/protocol/WondexProtocol.java
@@ -37,7 +37,7 @@ public class WondexProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new WondexFrameDecoder());
@@ -46,7 +46,7 @@ public class WondexProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new WondexProtocolDecoder(WondexProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/WondexProtocolEncoder.java b/src/org/traccar/protocol/WondexProtocolEncoder.java
index 918c22cda..c350838d0 100644
--- a/src/org/traccar/protocol/WondexProtocolEncoder.java
+++ b/src/org/traccar/protocol/WondexProtocolEncoder.java
@@ -26,15 +26,15 @@ public class WondexProtocolEncoder extends StringProtocolEncoder {
initDevicePassword(command, "0000");
switch (command.getType()) {
- case Command.TYPE_REBOOT_DEVICE:
- return formatCommand(command, "$WP+REBOOT={%s}", Command.KEY_DEVICE_PASSWORD);
- case Command.TYPE_POSITION_SINGLE:
- return formatCommand(command, "$WP+GETLOCATION={%s}", Command.KEY_DEVICE_PASSWORD);
- case Command.TYPE_IDENTIFICATION:
- return formatCommand(command, "$WP+VER={%s}", Command.KEY_DEVICE_PASSWORD);
- default:
- Log.warning(new UnsupportedOperationException(command.getType()));
- break;
+ case Command.TYPE_REBOOT_DEVICE:
+ return formatCommand(command, "$WP+REBOOT={%s}", Command.KEY_DEVICE_PASSWORD);
+ case Command.TYPE_POSITION_SINGLE:
+ return formatCommand(command, "$WP+GETLOCATION={%s}", Command.KEY_DEVICE_PASSWORD);
+ case Command.TYPE_IDENTIFICATION:
+ return formatCommand(command, "$WP+VER={%s}", Command.KEY_DEVICE_PASSWORD);
+ default:
+ Log.warning(new UnsupportedOperationException(command.getType()));
+ break;
}
return null;
diff --git a/src/org/traccar/protocol/XexunProtocol.java b/src/org/traccar/protocol/XexunProtocol.java
index 14afaf4cb..ecaf18db4 100644
--- a/src/org/traccar/protocol/XexunProtocol.java
+++ b/src/org/traccar/protocol/XexunProtocol.java
@@ -34,7 +34,7 @@ public class XexunProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
boolean full = Context.getConfig().getBoolean(getName() + ".extended");
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 69100f54b..06f255b91 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -37,13 +37,13 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern PATTERN_BASIC = new PatternBuilder()
.expression("G[PN]RMC,")
- .number("(dd)(dd)(dd).(d+),") // time
+ .number("(?:(dd)(dd)(dd))?.(d+),") // time
.expression("([AV]),") // validity
.number("(d*?)(d?d.d+),([NS]),") // latitude
.number("(d*?)(d?d.d+),([EW])?,") // longitude
.number("(d+.?d*),") // speed
.number("(d+.?d*)?,") // course
- .number("(dd)(dd)(dd),") // date
+ .number("(?:(dd)(dd)(dd))?,") // date
.expression("[^*]*").text("*")
.number("xx") // checksum
.expression("\\r\\n").optional()
@@ -67,15 +67,15 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
private String decodeAlarm(String value) {
if (value != null) {
switch (value) {
- case "help me!":
- return Position.ALARM_SOS;
- case "low battery":
- return Position.ALARM_LOW_BATTERY;
- case "move!":
- case "moved!":
- return Position.ALARM_MOVEMENT;
- default:
- break;
+ case "help me!":
+ return Position.ALARM_SOS;
+ case "low battery":
+ return Position.ALARM_LOW_BATTERY;
+ case "move!":
+ case "moved!":
+ return Position.ALARM_MOVEMENT;
+ default:
+ break;
}
}
return null;
diff --git a/src/org/traccar/protocol/XirgoProtocol.java b/src/org/traccar/protocol/XirgoProtocol.java
index c5ef27f54..9298f71ad 100644
--- a/src/org/traccar/protocol/XirgoProtocol.java
+++ b/src/org/traccar/protocol/XirgoProtocol.java
@@ -34,7 +34,7 @@ public class XirgoProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "##"));
@@ -43,7 +43,7 @@ public class XirgoProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new XirgoProtocolDecoder(XirgoProtocol.this));
}
});
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
diff --git a/src/org/traccar/protocol/Xt013Protocol.java b/src/org/traccar/protocol/Xt013Protocol.java
index b11256b7d..db9d21333 100644
--- a/src/org/traccar/protocol/Xt013Protocol.java
+++ b/src/org/traccar/protocol/Xt013Protocol.java
@@ -33,7 +33,7 @@ public class Xt013Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/protocol/YwtProtocol.java b/src/org/traccar/protocol/YwtProtocol.java
index 3fa154ec0..e24c8b02e 100644
--- a/src/org/traccar/protocol/YwtProtocol.java
+++ b/src/org/traccar/protocol/YwtProtocol.java
@@ -33,7 +33,7 @@ public class YwtProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
diff --git a/src/org/traccar/reports/ReportUtils.java b/src/org/traccar/reports/ReportUtils.java
index 924dff4c1..818920ad5 100644
--- a/src/org/traccar/reports/ReportUtils.java
+++ b/src/org/traccar/reports/ReportUtils.java
@@ -69,14 +69,14 @@ public final class ReportUtils {
&& lastPosition.getAttributes().get(Position.KEY_FUEL) != null) {
try {
switch (firstPosition.getProtocol()) {
- case "meitrack":
- case "galileo":
- case "noran":
- return new BigDecimal(firstPosition.getAttributes().get(Position.KEY_FUEL).toString())
- .subtract(new BigDecimal(lastPosition.getAttributes().get(Position.KEY_FUEL).toString()))
- .setScale(2, RoundingMode.HALF_EVEN).toString() + " %";
- default:
- break;
+ case "meitrack":
+ case "galileo":
+ case "noran":
+ BigDecimal v = new BigDecimal(firstPosition.getAttributes().get(Position.KEY_FUEL).toString());
+ v = v.subtract(new BigDecimal(lastPosition.getAttributes().get(Position.KEY_FUEL).toString()));
+ return v.setScale(2, RoundingMode.HALF_EVEN).toString() + " %";
+ default:
+ break;
}
} catch (Exception error) {
Log.warning(error);
diff --git a/src/org/traccar/reports/Summary.java b/src/org/traccar/reports/Summary.java
index 44fb1dd4c..d4171f644 100644
--- a/src/org/traccar/reports/Summary.java
+++ b/src/org/traccar/reports/Summary.java
@@ -37,7 +37,7 @@ public final class Summary {
private static SummaryReport calculateSummaryResult(long deviceId, Date from, Date to) throws SQLException {
SummaryReport result = new SummaryReport();
result.setDeviceId(deviceId);
- result.setDeviceName(Context.getDeviceManager().getDeviceById(deviceId).getName());
+ result.setDeviceName(Context.getIdentityManager().getDeviceById(deviceId).getName());
Collection<Position> positions = Context.getDataManager().getPositions(deviceId, from, to);
if (positions != null && !positions.isEmpty()) {
Position firstPosition = null;
@@ -60,7 +60,9 @@ public final class Summary {
speedSum += position.getSpeed();
result.setMaxSpeed(position.getSpeed());
}
- result.setDistance(ReportUtils.calculateDistance(firstPosition, previousPosition));
+ boolean ignoreOdometer = Context.getDeviceManager()
+ .lookupConfigBoolean(deviceId, "report.ignoreOdometer", false);
+ result.setDistance(ReportUtils.calculateDistance(firstPosition, previousPosition, !ignoreOdometer));
result.setAverageSpeed(speedSum / positions.size());
}
return result;
diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java
index 2171d5f93..f0a10edbd 100644
--- a/src/org/traccar/reports/Trips.java
+++ b/src/org/traccar/reports/Trips.java
@@ -53,15 +53,16 @@ public final class Trips {
long tripDuration = endTrip.getFixTime().getTime() - positions.get(startIndex).getFixTime().getTime();
long deviceId = startTrip.getDeviceId();
trip.setDeviceId(deviceId);
- String deviceName = Context.getDeviceManager().getDeviceById(deviceId).getName();
- trip.setDeviceName(deviceName);
+ trip.setDeviceName(Context.getIdentityManager().getDeviceById(deviceId).getName());
trip.setStartPositionId(startTrip.getId());
trip.setStartTime(startTrip.getFixTime());
trip.setStartAddress(startTrip.getAddress());
trip.setEndPositionId(endTrip.getId());
trip.setEndTime(endTrip.getFixTime());
trip.setEndAddress(endTrip.getAddress());
- trip.setDistance(ReportUtils.calculateDistance(startTrip, endTrip));
+ boolean ignoreOdometer = Context.getDeviceManager()
+ .lookupConfigBoolean(deviceId, "report.ignoreOdometer", false);
+ trip.setDistance(ReportUtils.calculateDistance(startTrip, endTrip, !ignoreOdometer));
trip.setDuration(tripDuration);
trip.setAverageSpeed(speedSum / (endIndex - startIndex));
trip.setMaxSpeed(speedMax);
diff --git a/src/org/traccar/web/CsvBuilder.java b/src/org/traccar/web/CsvBuilder.java
index 73d5fac1d..f59aabc7f 100644
--- a/src/org/traccar/web/CsvBuilder.java
+++ b/src/org/traccar/web/CsvBuilder.java
@@ -37,6 +37,12 @@ public class CsvBuilder {
SortedSet<Method> methods = new TreeSet<Method>(new Comparator<Method>() {
@Override
public int compare(Method m1, Method m2) {
+ if (m1.getName().equals("getAttributes") && !m1.getName().equals(m2.getName())) {
+ return 1;
+ }
+ if (m2.getName().equals("getAttributes") && !m1.getName().equals(m2.getName())) {
+ return -1;
+ }
return m1.getName().compareTo(m2.getName());
}
});
@@ -73,7 +79,10 @@ public class CsvBuilder {
} else if (method.getReturnType().equals(Map.class)) {
Map value = (Map) method.invoke(object);
if (value != null) {
- builder.append(MiscFormatter.toJson(value).toString());
+ String map = MiscFormatter.toJson(value).toString();
+ map = map.replaceAll("[\\{\\}\"]", "");
+ map = map.replaceAll(",", " ");
+ builder.append(map);
addSeparator();
}
}
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index e022a9285..ec15ea2be 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -34,6 +34,7 @@ import org.traccar.api.CorsResponseFilter;
import org.traccar.api.ObjectMapperProvider;
import org.traccar.api.ResourceErrorHandler;
import org.traccar.api.SecurityRequestFilter;
+import org.traccar.api.resource.AttributeAliasResource;
import org.traccar.api.resource.CommandResource;
import org.traccar.api.resource.GroupPermissionResource;
import org.traccar.api.resource.ServerResource;
@@ -161,7 +162,7 @@ public class WebServer {
GroupResource.class, DeviceResource.class, PositionResource.class,
CommandTypeResource.class, EventResource.class, GeofenceResource.class,
DeviceGeofenceResource.class, GeofencePermissionResource.class, GroupGeofenceResource.class,
- NotificationResource.class, ReportResource.class);
+ NotificationResource.class, ReportResource.class, AttributeAliasResource.class);
servletHandler.addServlet(new ServletHolder(new ServletContainer(resourceConfig)), "/*");
handlers.addHandler(servletHandler);
diff --git a/test/org/traccar/helper/PatternUtilTest.java b/test/org/traccar/helper/PatternUtilTest.java
index bb1349363..b6b05e88c 100644
--- a/test/org/traccar/helper/PatternUtilTest.java
+++ b/test/org/traccar/helper/PatternUtilTest.java
@@ -9,7 +9,7 @@ public class PatternUtilTest {
@Test
public void testCheckPattern() {
- assertEquals("ab", PatternUtil.checkPattern("abc", "abd").getPattern());
+ assertEquals("ab", PatternUtil.checkPattern("abc", "abd").getPatternMatch());
}
diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
index 26844994e..cb39b5d2e 100644
--- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
@@ -10,6 +10,24 @@ public class AplicomProtocolDecoderTest extends ProtocolTest {
AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new AplicomProtocol());
+ verifyAttributes(decoder, binary(
+ "48C1014143B4493145004900203F6D014B5557C20003000015060110FF00C800000000000000003D01141E283C500100260404010200000000000000000000000000C8000000000000010200110019001E0064019003E8"));
+
+ verifyAttributes(decoder, binary(
+ "48c10144b9de54e6b2008700205f710a57d23ec957d23b8d00000000300d0106ff00000000000000000000000000000000000000000000000000000000000000010a141e28323c46505a646e7801000f020104ff000000000000000000010102000f020104ff000000000000000000010103000f020104ff000000000000000000010105000f020104ff0000000000000000000101"));
+
+ verifyAttributes(decoder, binary(
+ "45c20145931876ffb2007100ffff6d00000057c6dd1970230d087b1f7d7f0000d0c1000000003580000035801f40ffff5001574442393036363035533132333435363700014142432d333435202020202020000000000000000000000000000000000000000000000001123130343632343639373030303030303100000000"));
+
+ verifyAttributes(decoder, binary(
+ "45c20145931876ffb2007100ffff6d00000057c6dd9170250d087b1f7d7f0000d0c1000000003580000035801f40ffff5001574442393036363035533132333435363700014142432d333435202020202020000000000000000000000000000000000000000000000001123130343632343639373030303030303100000000"));
+
+ verifyAttributes(decoder, binary(
+ "45c20145931876ffb2007100ffff6d00000057c6de0970270d087b1f7d7f0000d0c1000000003580000035801f40ffff5001574442393036363035533132333435363700014142432d333435202020202020000000000000000000000000000000000000000000000001123130343632343639373030303030303100000000"));
+
+ verifyAttributes(decoder, binary(
+ "44c3014645e8ecff3c00ea03ffffbc00f457d68a6557d68a6303bb55fa018843da1100009881000000000000000000000000000000000000000000000000000000000000000000000000000000ff0056007600000000000000014542016d0001010095070e14014645e8ecff3c57d68a6403bb55fa018843dac0010d14ff050102030405060708090a0b0c0d0e0f10112a01010730343f3c1ff5cf01020700007d007d23010103022f2e01060c67452301efcdab8967452301010b10000000007d007d007d7dffffffffffff010a2400000000000000010000000000000000ffffffffffffffff00010001ffff00000000ffff010c02fec6"));
+
verifyPosition(decoder, binary(
"44c3014645e8e91b66002300a21f0b01f056d3e62856d3e626031f845f00c6ee440800000000000000000017bd1cb30000"));
@@ -19,7 +37,7 @@ public class AplicomProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, binary(
"44c3014645e8e91b66001f00221f0b01f456ba1e0d56ba1e0b031f842200c6ef550c000000000017bd1cb30004"));
- verifyNothing(decoder, binary(
+ verifyAttributes(decoder, binary(
"44c3014645e8e9bada003e03fff7070055a4f24200000081000000000000000000000000000000000000000000000000000000000000000000000000000000ff00000001000000000000000044c3014645e8e9bada003e03fff77bff55a4f24300000081000000000000000000000000000000000000000000000000000000000000000000000000000000ff00300002000000000000000044c3014645e8e9bada003e03fff7690655a4f24500000081000000000000000000000000000000000000000000000000000000000000000000000000000000ff003000030000000000000000"));
verifyPosition(decoder, binary(
diff --git a/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java b/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
new file mode 100644
index 000000000..c5e99f60b
--- /dev/null
+++ b/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
@@ -0,0 +1,39 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArknavX8ProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ ArknavX8ProtocolDecoder decoder = new ArknavX8ProtocolDecoder(new ArknavX8Protocol());
+
+ verifyNothing(decoder, text(
+ "351856045213782,241111"));
+
+ verifyNothing(decoder, text(
+ "2R,090214235955,00,,00.04,03.76,001892024.9"));
+
+ verifyNothing(decoder, text(
+ "351856040005407,240101"));
+
+ verifyPosition(decoder, text(
+ "1R,110509053244,A,2457.9141N,12126.3321E,220.0,315,10.0,00000000"));
+
+ verifyNothing(decoder, text(
+ "2R,110509053244,837493,,998372,,,"));
+
+ verifyPosition(decoder, text(
+ "1G,110509053245,A,2457.9141N,12126.3192E,3.1,35,2.0,00000001"));
+
+ verifyPosition(decoder, text(
+ "1G,110509053246,A,2457.9121N,12126.3415E,2.0,288,1.7,00000000"));
+
+ verifyPosition(decoder, text(
+ "1M,110509053247,A,2457.9118N,12126.3522E,1.0,55,2.2,00000000"));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java b/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java
new file mode 100644
index 000000000..58e2e4065
--- /dev/null
+++ b/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java
@@ -0,0 +1,18 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class AutoGradeProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ AutoGradeProtocolDecoder decoder = new AutoGradeProtocolDecoder(new AutoGradeProtocol());
+
+ verifyPosition(decoder, text(
+ "(000000007322865733022629240170415A1001.1971N07618.1375E0.000145312128.59?A0024B0024C0000D0000E0000K0000L0000M0000N0000O0000"));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/CastelProtocolDecoderTest.java b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
index feba9386e..e2f2c26bf 100644
--- a/test/org/traccar/protocol/CastelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
@@ -12,6 +12,18 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
CastelProtocolDecoder decoder = new CastelProtocolDecoder(new CastelProtocol());
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "40405700043231334e583230313630303131373700000000004002c458ce572159ce57a9e2020082030000500c00000f0000000400036401240e0403023c000505210c210d210f21102101075b14030121330269430d0a"));
+
+ verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "40407800043231334e583230313630303131373700000000004004fa52ce574b53ce57cad1020041020000050c00000d0000000400036401240b0503001b042105210c210d210f211021112113211c211f212121232124212c212d213021312133213e2141214221452149214a214c214f215021384e0d0a"));
+
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "4040a600043231334e583230313630303131373700000000004005fa52ce575053ce57cad102006b020000050c00000d0000000400036401240b050300001b042105210c210d210f211021112113211c211f212121232124212c212d213021312133213e2141214221452149214a214c214f215021015bd604301f500600000653000000bc0bffff78250000ff2d98642401000f8080e038000f0f0000000000000077b10d0a"));
+
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "40404300043231334e583230313630303131373700000000004006fa52ce574e53ce57cad1020053020000050c00000d0000000400036401240b0503000000feec0d0a"));
+
verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"40403600043231334e583230313630303033343600000000004009ad31a457050810061a35b29bf80ae6da83180300320bbe32580d0a40403600043231334e583230313630303033343600000000004009ad31a457050810061a35b29bf80ae6da83180300320bbe32580d0a"));
@@ -36,16 +48,16 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"40406000043130303131313235323939383700000000000000400705000000C1F0695249F469529C9111000000000069830000D80040000400036401014C04030001190A0D04201E1480D60488C5721800000000AF0101060F000F00EA1E0D0A"));
- verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"404057000431303031313132353239393837000000000000004002C1F06952F0F169529C9111000000000069830000470000000400036401014C01030078000505210C210D210F21102101073BE8030064280AEB930D0A"));
verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"40405900043130303131313235323939383700000000000000400101C1F06952E7F069529C9111000000000069830000070000000400036401014C00030001190A0D0412041480D60488C57218000000009F01E803ED9A0D0A"));
- verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"4040B9000431303031313132353239393837000000000000004005C1F069521BF169529C9111000000000069830000130000000400036401014C0003000022032104210521062107210C210D210E210F2110211121132115211C211F21212124212E212F2130213121322133213C214221432144214521472149214A214C214D214E210100643B6232E803003E64280A3C24FE00010E010F00D5805A483C640000000000010000E02E000000066400000500000000A7710D0A"));
- verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"404043000431303031313132353239393837000000000000004006C1F0695209F169529C91110000000000698300000D0000000400036401014C00030000009AF40D0A"));
verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
@@ -60,7 +72,7 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"40405c000c363131313530303030393536000000000000000040011c0a0f0e362dca53cd0860831303000000000300000000ff000000000000007ba083a650542d3639305f56312e312e320050542d3639302056312e32008a020d0a"));
- verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"4040450004323132474c31313433303035303033000000000040082ca89b55a6a99b555c57000000000000c40200000b0000001400036401111f000302f5533bd653f10d0a"));
verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
@@ -69,7 +81,7 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"4040420004323132474c31313433303035303033000000000010022ca89b55cca99b555c57000000000000cf0200000b0000000000036401111f0000020013be0d0a"));
- verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"4040870004323132474c31313433303035303033000000000040052ca89b55e3a89b555c57000000000000c4020000040000001400036401111f0003000012042105210b210c210d210f211021112113211c2121212321242133213421422146214f212b50663603003ce9030dff060000600dffffc25865ffff9e02b43624000000003cbc0d0a"));
verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
diff --git a/test/org/traccar/protocol/CguardProtocolDecoderTest.java b/test/org/traccar/protocol/CguardProtocolDecoderTest.java
new file mode 100644
index 000000000..49d037f8f
--- /dev/null
+++ b/test/org/traccar/protocol/CguardProtocolDecoderTest.java
@@ -0,0 +1,54 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class CguardProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ CguardProtocolDecoder decoder = new CguardProtocolDecoder(new CguardProtocol());
+
+ verifyNothing(decoder, text(
+ "IDRO:354868050655283"));
+
+ verifyPosition(decoder, text(
+ "NV:160711 044023:54.342907:48.582590:0:NAN:0:110.1"));
+
+ verifyPosition(decoder, text(
+ "NV:160711 044023:54.342907:-148.582590:0:NAN:0:110.1"));
+
+ verifyNothing(decoder, text(
+ "BC:160711 044023:CSQ1:48:NSQ1:7:NSQ2:1:BAT1:98:PWR1:11.7:CLG1:NAN"));
+
+ verifyNothing(decoder, text(
+ "BC:160711 044524:CSQ1:61:NSQ1:18:BAT1:98:PWR1:11.7:CLG1:NAN"));
+
+ verifyNothing(decoder, text(
+ "VERSION:3.3"));
+
+ verifyPosition(decoder, text(
+ "NV:160420 101902:55.799425:37.674033:0.94:NAN:213.59:156.6"));
+
+ verifyNothing(decoder, text(
+ "BC:160628 081024:CSQ1:32:NSQ1:10:BAT1:100"));
+
+ verifyNothing(decoder, text(
+ "BC:160628 081033:NSQ2:0"));
+
+ verifyPosition(decoder, text(
+ "NV:160630 151537:55.799913:37.674267:0.7:NAN:10.21:174.9"));
+
+ verifyNothing(decoder, text(
+ "BC:160630 153316:BAT1:76"));
+
+ verifyNothing(decoder, text(
+ "BC:160630 153543:NSQ2:0"));
+
+ verifyNothing(decoder, text(
+ "PING"));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
index cc710def0..fb0dec4fb 100644
--- a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
@@ -10,6 +10,15 @@ public class GoSafeProtocolDecoderTest extends ProtocolTest {
GoSafeProtocolDecoder decoder = new GoSafeProtocolDecoder(new GoSafeProtocol());
+ verifyNotNull(decoder, text(
+ "*GS56,356449063230915,052339180916,,SYS:G7S;V1.08;V1.2,GPS:V;4;N24.730006;E46.637816;14;0;630,GSM:;;420;4;5655;507A;-70,COT:75242;2-8-17,ADC:13.22;0.08,DTT:23004;;0;0;0;1#"));
+
+ verifyNotNull(decoder, text(
+ "*GS56,356449063230915,052349180916,,SYS:G7S;V1.08;V1.2,GPS:V;6;N24.730384;E46.637620;47;56;607,GSM:;;420;4;5655;507A;-70,COT:75290;2-8-27,ADC:13.24;0.08,DTT:23004;;0;0;0;1#"));
+
+ verifyNotNull(decoder, text(
+ "*GS56,356449063230915,052444180916,,SYS:G7S;V1.08;V1.2,GPS:V;6;N24.730384;E46.637620;47;56;607,GSM:;;420;4;5655;F319;-102,COT:75290;2-9-27,ADC:13.00;0.08,DTT:23004;;0;0;0;1$052449180916,,SYS:G7S;V1.08;V1.2,GPS:V;6;N24.730384;E46.637620;47;56;607,GSM:;;420;4;5655;F319;-102,COT:75290;2-9-27,ADC:13.13;0.08,DTT:23004;;0;0;0;1#"));
+
verifyPositions(decoder, text(
"*GS16,356449062643845,141224290316,,SYS:G79;V1.13;V1.0.2,GPS:V;5;N24.694972;E46.680736;46;334;606;1.43,GSM:;;420;4;5655;4EB8;-57,COT:330034,ADC:13.31;3.83,DTT:27004;;0;0;0;1,OBD:064101000400000341057E04410304000341510104411001C203410F4B0341112904411F01AB0641010004000014490201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03410D21,FUL:28260"));
diff --git a/test/org/traccar/protocol/H02FrameDecoderTest.java b/test/org/traccar/protocol/H02FrameDecoderTest.java
index e8b045048..a8417341a 100644
--- a/test/org/traccar/protocol/H02FrameDecoderTest.java
+++ b/test/org/traccar/protocol/H02FrameDecoderTest.java
@@ -9,7 +9,7 @@ public class H02FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- H02FrameDecoder decoder = new H02FrameDecoder();
+ H02FrameDecoder decoder = new H02FrameDecoder(32);
Assert.assertEquals(
binary("2a48512c3335333538383036303031353536382c56312c3139333530352c412c3830392e303031302c532c333435342e383939372c572c302e30302c302e30302c3239313031332c65666666666266662c3030303264342c3030303030622c3030353338352c3030353261612c323523"),
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
index d147cdec2..e4db2f56f 100644
--- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class H02ProtocolDecoderTest extends ProtocolTest {
H02ProtocolDecoder decoder = new H02ProtocolDecoder(new H02Protocol());
verifyPosition(decoder, buffer(
+ "*HQ,4209917484,V19,093043,V,5052.9749,N,00426.4322,E,000.00,000,130916,,0032475874141,8944538530000543700F,FFFFFBFF#"));
+
+ verifyPosition(decoder, buffer(
"*HQ,353505220873067,V1,,V,4605.75732,N,01430.73863,E,0.00,0,,FFFFFFEF,125,194, 64,d3#"));
verifyPosition(decoder, buffer(
diff --git a/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java
new file mode 100644
index 000000000..c64be017f
--- /dev/null
+++ b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class JpKorjarProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ JpKorjarProtocolDecoder decoder = new JpKorjarProtocolDecoder(new JpKorjarProtocol());
+
+ verifyPosition(decoder, text(
+ "KORJAR.PL,329587014519383,160910144240,52.247254N,021.013375E,0.00,1,F:4.18V,1 260 01 794B 3517,"));
+
+ verifyPosition(decoder, text(
+ "KORJAR.PL,329587014519383,160910144240,52.895515N,021.949151E,6.30,212,F:3.94V,0 260 01 794B 3519,"));
+
+ verifyPosition(decoder, text(
+ "KORJAR.PL,329587014519383,160910144240,52.895596N,021.949343E,12.46,087,L:2.18V,1 260 01 794B 3517,"));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
index b95d8ddce..4bbfb5627 100644
--- a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
@@ -11,6 +11,36 @@ public class Jt600ProtocolDecoderTest extends ProtocolTest {
Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(new Jt600Protocol());
+ verifyPosition(decoder, buffer(
+ "(3301210003,U01,040812,185302,T,22.564025,N,113.242329,E,5.21,152,9,32%,00000000000011,10133,5173,22,100,1)"));
+
+ verifyPosition(decoder, buffer(
+ "(3301210003,U02,040812,185302,T,22.564025,N,113.242329,E,5,152,9,32%,00000000000011,10133,5173,22,100,1)"));
+
+ verifyPosition(decoder, buffer(
+ "(3301210003,U03,040812,185302,T,22.564025,N,113.242329,E,5,152,9,32%,00000000000011,10133,5173,22,100,1)"));
+
+ verifyNothing(decoder, buffer(
+ "(3301210003,U04)"));
+
+ verifyPosition(decoder, buffer(
+ "(3301210003,U06,1,040812,185302,T,22.564025,N,113.242329,E,5,152,9,32%,0000000000011,10133,5173,22,100,1,300,100,10)"));
+
+ verifyPosition(decoder, buffer(
+ "(3460311327,U01,220916,135251,T,9.552607,N,13.658292,W,0.31,0,9,0%,00001001000000,11012,10,27,0,0,33)"));
+
+ verifyPosition(decoder, buffer(
+ "(3460311327,U01,010100,000024,F,0.000000,N,0.000000,E,0.00,0,0,100%,00000001000000,263,1,18,0,0,33)"));
+
+ verifyNothing(decoder, buffer(
+ "(3460311327,@JT)"));
+
+ verifyPosition(decoder, buffer(
+ "(3460311327,U06,11,220916,135643,T,9.552553,N,13.658265,W,0.61,0,9,100%,00000001000000,11012,10,30,0,0,126,0,30)"));
+
+ verifyPosition(decoder, buffer(
+ "(3460311327,U06,10,220916,140619,T,9.552495,N,13.658227,W,0.43,0,7,0%,00101001000000,11012,10,0,0,0,126,0,30)"));
+
verifyPosition(decoder, binary(
"24311021600111001B16021105591022329862114046227B0598095080012327951435161F"),
position("2011-02-16 05:59:10.000", true, 22.54977, -114.07705));
@@ -31,11 +61,11 @@ public class Jt600ProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, buffer(
"(3120820029,W01,02553.3555,E,2438.0997,S,A,171012,053339,0,8,20,6,31,5,20,20)"));
- /*verifyPosition(decoder, text( ChannelBuffers.copiedBuffer(
- "(3330104377,U01,010100,010228,F,00.000000,N,000.000000,E,0,0,0,0%,00001000000000,741,14,22,0,206)", StandardCharsets.US_ASCII)));
+ verifyPosition(decoder, buffer(
+ "(3330104377,U01,010100,010228,F,00.000000,N,000.000000,E,0,0,0,0%,00001000000000,741,14,22,0,206)"));
- verifyPosition(decoder, text( ChannelBuffers.copiedBuffer(
- "(6221107674,2,U09,129,2,A,280513113036,E,02711.0500,S,1721.0876,A,030613171243,E,02756.7618,S,2300.0325,3491,538200,14400,1)",StandardCharsets.US_ASCII))));*/
+ verifyNothing(decoder, buffer(
+ "(6221107674,2,U09,129,2,A,280513113036,E,02711.0500,S,1721.0876,A,030613171243,E,02756.7618,S,2300.0325,3491,538200,14400,1)"));
}
diff --git a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
index 76f62d0f5..58d761ed8 100644
--- a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class MeiligaoProtocolDecoderTest extends ProtocolTest {
MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(new MeiligaoProtocol());
+ verifyAttributes(decoder, binary(
+ "4040005066104020094432990131302E312C302C3135362C302E30302C31392E36312C2D33342C33342E32362C32312E38332C372E39312C313033332C322E36392C362E35352C302C302C309DBF0D0A"));
+
verifyPosition(decoder, binary(
"242400746251103044ffff99553033353033392e3939392c412c323832332e373632312c4e2c31303635322e303730342c572c3030302e302c3030302e302c3136303631362c2c2c412a37357c302e397c323038332e327c303030307c303030302c303030307c31303034333736333265780d0a"));
diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
index abe21c68e..1b7287e7b 100644
--- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -12,6 +12,12 @@ public class NoranProtocolDecoderTest extends ProtocolTest {
NoranProtocolDecoder decoder = new NoranProtocolDecoder(new NoranProtocol());
+ verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "0d0a2a4b57000d000080010d0a"));
+
+ verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "34000800010b0000000000003f43bb8da6c2ebe229424e523039423233343439000031362d30392d31352030373a30303a303700"));
+
verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"28003200c380000000469458408c4ad340ad381e3f4e52303947313336303900000001ff00002041"));
diff --git a/test/org/traccar/protocol/OigoProtocolDecoderTest.java b/test/org/traccar/protocol/OigoProtocolDecoderTest.java
new file mode 100644
index 000000000..14c34ae7c
--- /dev/null
+++ b/test/org/traccar/protocol/OigoProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class OigoProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ OigoProtocolDecoder decoder = new OigoProtocolDecoder(new OigoProtocol());
+
+ verifyPosition(decoder, binary(
+ "7e004200000014631000258257000000ffff02d0690e000220690e0002200696dbd204bdfde31a070000b307101135de106e05f500000000010908010402200104ffff8001"));
+
+ verifyPosition(decoder, binary(
+ "7e004200000014631000258257000000ffff02d1690e00051f690e00051f0696dbd204bdfde31a070000b307100f35c0106305f500000000010908010402200104ffff8001"));
+
+ verifyPosition(decoder, binary(
+ "7e004200000014631000258257000000ffff0d82691300001669130000160696dbd804bdfdbb1a0800000007101035a2106905f500000000010908010402200104ffff8001"));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
index 8532dd6c9..9cf7b9006 100644
--- a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
@@ -12,32 +12,32 @@ public class TramigoProtocolDecoderTest extends ProtocolTest {
TramigoProtocolDecoder decoder = new TramigoProtocolDecoder(new TramigoProtocol());
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"8000853eb000b8000101fcff032f14665a89e2564176656e7369732053797353657276653a2049676e6974696f6e206f6e2064657465637465642c206d6f76696e672c20302e3135206b6d205357206f66204261626120416e696d61736861756e205374726565742d426f64652054686f6d61732053742e2c20537572756c6572652c204c61676f7320436974792c204e472c20362e34383736352c20332e33343735352c2031303a3031204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"8000973eb000b90001012128032f14667794e2564176656e7369732053797353657276653a2049676e6974696f6e206f6e2064657465637465642c2073746f707065642c20302e3134206b6d205357206f66204261626120416e696d61736861756e205374726565742d426f64652054686f6d61732053742e2c20537572756c6572652c204c61676f7320436974792c204e472c20362e34383736372c20332e33343737332c2031303a3438204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"8000b73eb000ad000101fdd2032f1466c9cbe2564176656e7369732053797353657276653a2049676e6974696f6e206f6e2064657465637465642c206d6f76696e672c20302e3131206b6d2045206f6620416c68616a69204d6173686120526f616420466f6f746272696467652c20537572756c6572652c204c61676f7320436974792c204e472c20362e35303031342c20332e33353434332c2031343a3434204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"8000883eb000d3000101b223032f1466fc89e2564176656e7369732053797353657276653a2049676e6974696f6e206f66662064657465637465642c2049676e4f6e506572696f643a2030303a30323a34312c2073746f707065642c20302e3039206b6d205345206f66204a696e616475205072696d617279205363686f6f6c20416465204f6e6974696d6572696e2053742e2c20537572756c6572652c204c61676f7320436974792c204e472c20362e34383639332c20332e33343636302c2031303a3033204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"80009a3eb000d300010109ff032f1466b195e2564176656e7369732053797353657276653a2049676e6974696f6e206f66662064657465637465642c2049676e4f6e506572696f643a2030303a30353a31342c2073746f707065642c20302e3039206b6d205345206f66204a696e616475205072696d617279205363686f6f6c20416465204f6e6974696d6572696e2053742e2c20537572756c6572652c204c61676f7320436974792c204e472c20362e34383639312c20332e33343636322c2031303a3533204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"8000bc3eb000ba000101622c032f1466bacce2564176656e7369732053797353657276653a2049676e6974696f6e206f66662064657465637465642c2049676e4f6e506572696f643a2030303a30343a30302c206d6f76696e672c20617420416b6572656c6520526f61642d4f67756e6c616e612044726976652c20537572756c6572652c204c61676f7320436974792c204e472c20362e35303630332c20332e33353232382c2031343a3438204d6172203131202020454f46"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"80001d3cb000b3000101160f032f1466b475e0564176656e7369732053797353657276653a205374617475732c204750533a203931252c2047534d3a203737252c20475052533a20436f6e6e65637465642c20626174746572793a20313030252c207265706f7274733a2049676e6974696f6e20286f6666292c205374617475732028352c322e302c3732302c3330292c20362e34393239382c20332e33343836352c2031393a3038204d6172203920454f46"));
- //verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
- // "80005408b000af000101b23903677f00c8436d3842616c697365204f6e653a20416c6c756d616765206d61726368652064e974656374e92c20676172e92c20302e3735206b6d20452064652045636f6c65204175746f726f757465206465204b696e73686173612c2056696c6c65206465204b696e73686173612c204b696e73686173612c2043442c202d342e33343130362c2031352e33343931352c2030313a3030204a616e2031202020454f46"));
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "80005408b000af000101b23903677f00c8436d3842616c697365204f6e653a20416c6c756d616765206d61726368652064e974656374e92c20676172e92c20302e3735206b6d20452064652045636f6c65204175746f726f757465206465204b696e73686173612c2056696c6c65206465204b696e73686173612c204b696e73686173612c2043442c202d342e33343130362c2031352e33343931352c2030313a3030204a616e2031202020454f46"));
- //verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
- // "8000011bb0009e0001015b93032ef6f35994a9545472616d69676f3a204d6f76696e672c20302e3930206b6d205345206f66204372616e6562726f6f6b20466972652053746174696f6e2c2050656e726974682c205379646e65792c2041552c202d33332e37303732322c203135302e37313735392c2053452077697468207370656564203337206b6d2f682c2031393a3438204a616e20342020454f46"));
+ verifyAttributes(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "8000011bb0009e0001015b93032ef6f35994a9545472616d69676f3a204d6f76696e672c20302e3930206b6d205345206f66204372616e6562726f6f6b20466972652053746174696f6e2c2050656e726974682c205379646e65792c2041552c202d33332e37303732322c203135302e37313735392c2053452077697468207370656564203337206b6d2f682c2031393a3438204a616e20342020454f46"));
// Tramigo: Parked, 0.12 km E of McDonald's H.V. dela Costa, Makati, 11:07 Mar 27
// Tramigo: Moving, 0.90 km SE of Cranebrook Fire Station, Penrith, Sydney, AU, -33.70722, 150.71759, SE with speed 37 km/h, 19:48 Jan 4 EOF
diff --git a/test/org/traccar/protocol/WatchProtocolDecoderTest.java b/test/org/traccar/protocol/WatchProtocolDecoderTest.java
index a8f7b12bc..6116c2c2b 100644
--- a/test/org/traccar/protocol/WatchProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WatchProtocolDecoderTest.java
@@ -54,6 +54,9 @@ public class WatchProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, text(
"[SG*8800000015*0087*AL,220414,134652,A,22.571707,N,113.8613968,E,0.1,0.0,100,7,60,90,1000,50,0001,4,1,460,0,9360,4082,131,9360,4092,148,9360,4091,143,9360,4153,141"));
+ verifyAttributes(decoder, text(
+ "[CS*8800000015*0008*PULSE,72"));
+
}
}
diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
index ac90daec5..e94fb62e8 100644
--- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -11,6 +10,9 @@ public class XexunProtocolDecoderTest extends ProtocolTest {
XexunProtocolDecoder decoder = new XexunProtocolDecoder(new XexunProtocol(), false);
+ verifyAttributes(decoder, text(
+ "GPRMC,.000,A,0.000000,S,0.0000,W,0.00,0.00,,00,0000.0,A*55,L,,imei:353579010727036,"));
+
verifyPosition(decoder, text(
"GPRMC,113518.000,A,5303.4150,N,10.2368,E,60.73,207.42,260216,00,0000.0,A*74,F,,imei:351525018007873,"));
diff --git a/tools/hex.sh b/tools/hex.sh
index cfae14bb6..78cd8fa38 100755
--- a/tools/hex.sh
+++ b/tools/hex.sh
@@ -10,26 +10,34 @@
if [ $# -lt 2 ]
then
- echo "USAGE: $0 <port> <hex>"
+ echo "USAGE: $0 <host> <port> <hex>"
+ echo "If only <port> and <hex> are present, <host> defaults to localhost."
exit 1
fi
+host="$1"; port="$2"; hex="$3";
+
+if [ $# -eq 2 ]
+then
+ host="localhost"; port="$1"; hex="$2";
+fi
+
send_hex_udp () {
- echo $2 | xxd -r -p | nc -u -w 0 localhost $1
+ echo "$hex" | xxd -r -p | nc -u -w 0 "$host" "$port"
}
send_hex_tcp () {
- echo $2 | xxd -r -p | nc localhost $1
+ echo "$hex" | xxd -r -p | nc "$host" "$port"
}
send_text_udp () {
- echo -n -e $2 | nc -u -w 0 localhost $1
+ echo -n -e "$hex" | nc -u -w 0 "$host" "$port"
}
send_text_tcp () {
- echo -n -e $2 | nc localhost $1
+ echo -n -e "$hex" | nc "$host" "$port"
}
-send_hex_tcp $1 $2
+send_hex_tcp "$host" "$port" "$hex"
exit $?
diff --git a/tools/minify.bat b/tools/minify.bat
deleted file mode 100644
index 6ab8fd94b..000000000
--- a/tools/minify.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@echo off
-cd C:\[traccar path]\traccar\web
-set SDK=C:\[sencha path]\ext-6.0.0
-
-sencha -sdk %SDK% compile -classpath=app.js,app,%SDK%\packages\core\src,%SDK%\packages\core\overrides,%SDK%\classic\classic\src,%SDK%\classic\classic\overrides exclude -all and include -recursive -file app.js and exclude -namespace=Ext and concatenate -closure app.min.js
diff --git a/tools/minify.sh b/tools/minify.sh
deleted file mode 100755
index 4a5c47f9d..000000000
--- a/tools/minify.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-cd $(dirname $0)/../web
-
-SDK="../../ext-6.0.1"
-
-sencha compile --classpath=app.js,app,$SDK/packages/core/src,$SDK/packages/core/overrides,$SDK/classic/classic/src,$SDK/classic/classic/overrides \
- exclude -all \
- and \
- include -recursive -file app.js \
- and \
- exclude -namespace=Ext \
- and \
- concatenate -closure app.min.js
diff --git a/tools/translate.py b/tools/translate.py
deleted file mode 100755
index e8324a61a..000000000
--- a/tools/translate.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import os
-import optparse
-import urllib2
-import json
-import base64
-
-parser = optparse.OptionParser()
-parser.add_option("-u", "--user", dest="username", help="transifex user login")
-parser.add_option("-p", "--password", dest="password", help="transifex user password")
-
-(options, args) = parser.parse_args()
-
-if not options.username or not options.password:
- parser.error('User name and password are required')
-
-os.chdir(os.path.dirname(os.path.abspath(__file__)))
-
-path = "../web/l10n/"
-
-def request(url):
- req = urllib2.Request(url)
- auth = base64.encodestring("%s:%s" % (options.username, options.password)).replace("\n", "")
- req.add_header("Authorization", "Basic %s" % auth)
- return urllib2.urlopen(req)
-
-resource = json.load(request("https://www.transifex.com/api/2/project/traccar/resource/web/?details"))
-
-for language in resource["available_languages"]:
- code = language["code"]
- data = request("https://www.transifex.com/api/2/project/traccar/resource/web/translation/" + code + "?file")
- file = open(path + code + ".json", "wb")
- file.write(data.read())
- file.close()
diff --git a/web b/web
new file mode 120000
index 000000000..1649d3676
--- /dev/null
+++ b/web
@@ -0,0 +1 @@
+../traccar-web/web \ No newline at end of file
diff --git a/web/.jscsrc b/web/.jscsrc
deleted file mode 100644
index dda6932e1..000000000
--- a/web/.jscsrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "preset": "crockford",
- "maxErrors": 100,
- "excludeFiles": ["arrowstyle.js"]
-}
diff --git a/web/.jshintignore b/web/.jshintignore
deleted file mode 100644
index 1c48d68e2..000000000
--- a/web/.jshintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-l10n/**
-tests/**
-locale.js
-arrowstyle.js
diff --git a/web/.jshintrc b/web/.jshintrc
deleted file mode 100644
index 0d2e29d52..000000000
--- a/web/.jshintrc
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- // Enforcing
- "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
- "camelcase" : true, // true: Identifiers must be in camelCase
- "curly" : true, // true: Require {} for every new block or scope
- "eqeqeq" : true, // true: Require triple equals (===) for comparison
- "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
- "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
- "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
- "indent" : 4, // {int} Number of spaces to use for indentation
- "latedef" : true, // true: Require variables/functions to be defined before being used
- "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
- "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
- "noempty" : true, // true: Prohibit use of empty blocks
- "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
- "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
- "plusplus" : false, // true: Prohibit use of `++` and `--`
- "quotmark" : "single", // Quotation mark consistency:
- // false : do nothing (default)
- // true : ensure whatever is used is consistent
- // "single" : require single quotes
- // "double" : require double quotes
- "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
- "unused" : "vars", // Unused variables:
- // true : all variables, last function parameter
- // "vars" : all variables only
- // "strict" : all variables, all function parameters
- "strict" : false, // true: Requires all functions run in ES5 Strict Mode
- "maxparams" : false, // {int} Max number of formal params allowed per function
- "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
- "maxstatements" : false, // {int} Max number statements per function
- "maxcomplexity" : false, // {int} Max cyclomatic complexity per function
- "maxlen" : false, // {int} Max number of characters per line
- "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed.
-
- // Relaxing
- "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
- "boss" : false, // true: Tolerate assignments where comparisons would be expected
- "debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
- "eqnull" : false, // true: Tolerate use of `== null`
- "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
- "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
- "evil" : false, // true: Tolerate use of `eval` and `new Function()`
- "expr" : false, // true: Tolerate `ExpressionStatement` as Programs
- "funcscope" : false, // true: Tolerate defining variables inside control statements
- "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
- "iterator" : false, // true: Tolerate using the `__iterator__` property
- "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
- "laxbreak" : false, // true: Tolerate possibly unsafe line breakings
- "laxcomma" : false, // true: Tolerate comma-first style coding
- "loopfunc" : false, // true: Tolerate functions being defined in loops
- "multistr" : false, // true: Tolerate multi-line strings
- "noyield" : false, // true: Tolerate generator functions with no yield statement in them.
- "notypeof" : false, // true: Tolerate invalid typeof operator values
- "proto" : false, // true: Tolerate using the `__proto__` property
- "scripturl" : false, // true: Tolerate script-targeted URLs
- "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
- "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
- "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
- "validthis" : false, // true: Tolerate using this in a non-constructor function
-
- // Environments
- "browser" : true, // Web Browser (window, document, etc)
- "devel" : true, // Development/debugging (alert, confirm, etc)
- "node" : true, // Node.js
-
- // Custom Globals
- "globals" : {
- "Ext" : false,
- "ol" : false,
- "Traccar" : false,
- "Strings" : false,
- "Locale" : false
- }
-}
diff --git a/web/app.css b/web/app.css
deleted file mode 100644
index 95417606c..000000000
--- a/web/app.css
+++ /dev/null
@@ -1,69 +0,0 @@
-.view-color-green {
- background-color: rgba(77, 250, 144, 0.3);
-}
-.view-color-yellow {
- background-color: rgba(250, 190, 77, 0.3);
-}
-.view-color-red {
- background-color: rgba(255, 84, 104, 0.3);
-}
-
-.x-tree-icon {
- display: none !important;
-}
-
-.state-indicator {
- position: absolute;
- top: -999em;
- left: -999em;
- z-index: 0;
-}
-
-@media all and (max-device-width: 768px) {
- .state-indicator {
- z-index: 1;
- }
-}
-
-#attribution {
- position: absolute;
- bottom: 10px;
- right: 15px;
- font-size: x-small;
-}
-
-#spinner {
- position: absolute;
- top: 50%;
- left: 50%;
- height: 60px;
- width: 60px;
- margin-top: -30px;
- margin-left: -30px;
- -webkit-animation: rotation .8s infinite linear;
- -moz-animation: rotation .8s infinite linear;
- -o-animation: rotation .8s infinite linear;
- animation: rotation .8s infinite linear;
- border-left: 6px solid rgba(56, 146, 212, .15);
- border-right: 6px solid rgba(56, 146, 212, .15);
- border-bottom: 6px solid rgba(56, 146, 212, .15);
- border-top: 6px solid rgba(56, 146, 212, .8);
- border-radius: 100%;
-}
-
-@-webkit-keyframes rotation {
- from { -webkit-transform: rotate(0deg); }
- to { -webkit-transform: rotate(359deg); }
-}
-@-moz-keyframes rotation {
- from { -moz-transform: rotate(0deg); }
- to { -moz-transform: rotate(359deg); }
-}
-@-o-keyframes rotation {
- from { -o-transform: rotate(0deg); }
- to { -o-transform: rotate(359deg); }
-}
-@keyframes rotation {
- from { transform: rotate(0deg); }
- to { transform: rotate(359deg); }
-}
diff --git a/web/app.js b/web/app.js
deleted file mode 100644
index 597cce492..000000000
--- a/web/app.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.application({
- name: 'Traccar',
- extend: 'Traccar.Application'
-});
diff --git a/web/app/Application.js b/web/app/Application.js
deleted file mode 100644
index 2d806534e..000000000
--- a/web/app/Application.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.Application', {
- extend: 'Ext.app.Application',
- name: 'Traccar',
-
- requires: [
- 'Traccar.Style',
- 'Traccar.AttributeFormatter'
- ],
-
- models: [
- 'Server',
- 'User',
- 'Group',
- 'Device',
- 'Position',
- 'Attribute',
- 'Command',
- 'Event',
- 'Geofence',
- 'Notification',
- 'ReportSummary',
- 'ReportTrip'
- ],
-
- stores: [
- 'Groups',
- 'Devices',
- 'AllGroups',
- 'AllDevices',
- 'Positions',
- 'LatestPositions',
- 'Users',
- 'Attributes',
- 'MapTypes',
- 'DistanceUnits',
- 'SpeedUnits',
- 'CommandTypes',
- 'TimeUnits',
- 'Languages',
- 'Events',
- 'Geofences',
- 'AllGeofences',
- 'Notifications',
- 'AllNotifications',
- 'GeofenceTypes',
- 'ReportRoute',
- 'ReportEvents',
- 'ReportTrips',
- 'ReportSummary',
- 'ReportTypes',
- 'ReportEventTypes'
- ],
-
- controllers: [
- 'Root'
- ],
-
- setUser: function (data) {
- var reader = Ext.create('Ext.data.reader.Json', {
- model: 'Traccar.model.User'
- });
- this.user = reader.readRecords(data).getRecords()[0];
- },
-
- getUser: function () {
- return this.user;
- },
-
- setServer: function (data) {
- var reader = Ext.create('Ext.data.reader.Json', {
- model: 'Traccar.model.Server'
- });
- this.server = reader.readRecords(data).getRecords()[0];
- },
-
- getServer: function () {
- return this.server;
- },
-
- getPreference: function (key, defaultValue) {
- return this.getUser().get(key) || this.getServer().get(key) || defaultValue;
- },
-
- showError: function (response) {
- var data;
- if (Ext.isString(response)) {
- Ext.Msg.alert(Strings.errorTitle, response);
- } else if (response.responseText) {
- data = Ext.decode(response.responseText);
- if (data.details) {
- Ext.Msg.alert(Strings.errorTitle, data.details);
- } else {
- Ext.Msg.alert(Strings.errorTitle, data.message);
- }
- } else if (response.statusText) {
- Ext.Msg.alert(Strings.errorTitle, response.statusText);
- } else {
- Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
- }
- }
-});
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
deleted file mode 100644
index 1fff07bcf..000000000
--- a/web/app/AttributeFormatter.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.AttributeFormatter', {
- singleton: true,
-
- coordinateFormatter: function (value) {
- return value.toFixed(Traccar.Style.coordinatePrecision);
- },
-
- speedFormatter: function (value) {
- return Ext.getStore('SpeedUnits').formatValue(value, Traccar.app.getPreference('speedUnit'));
- },
-
- courseFormatter: function (value) {
- var courseValues = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'];
- return courseValues[Math.floor(value / 45)];
- },
-
- distanceFormatter: function (value) {
- return Ext.getStore('DistanceUnits').formatValue(value, Traccar.app.getPreference('distanceUnit'));
- },
-
- hoursFormatter: function (value) {
- var hours = Math.round(value / 3600000);
- return (hours + ' ' + Strings.sharedHourAbbreviation);
- },
-
- durationFormatter: function (value) {
- var hours, minutes;
- hours = Math.floor(value / 3600000);
- minutes = Math.round((value % 3600000) / 60000);
- return (hours + ' ' + Strings.sharedHourAbbreviation + ' ' + minutes + ' ' + Strings.sharedMinuteAbbreviation);
- },
-
- defaultFormatter: function (value) {
- if (typeof value === 'number') {
- return Number(value.toFixed(Traccar.Style.numberPrecision));
- } else if (typeof value === 'boolean') {
- return value ? Ext.Msg.buttonText.yes : Ext.Msg.buttonText.no;
- } else if (value instanceof Date) {
- if (Traccar.app.getPreference('twelveHourFormat', false)) {
- return Ext.Date.format(value, Traccar.Style.dateTimeFormat12);
- } else {
- return Ext.Date.format(value, Traccar.Style.dateTimeFormat24);
- }
- }
- return value;
- },
-
- getFormatter: function (key) {
- if (key === 'latitude' || key === 'longitude') {
- return this.coordinateFormatter;
- } else if (key === 'speed') {
- return this.speedFormatter;
- } else if (key === 'course') {
- return this.courseFormatter;
- } else if (key === 'distance' || key === 'odometer' || key === 'totalDistance') {
- return this.distanceFormatter;
- } else if (key === 'hours') {
- return this.hoursFormatter;
- } else if (key === 'duration') {
- return this.durationFormatter;
- } else {
- return this.defaultFormatter;
- }
- }
-});
diff --git a/web/app/GeofenceConverter.js b/web/app/GeofenceConverter.js
deleted file mode 100644
index 339f09615..000000000
--- a/web/app/GeofenceConverter.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.GeofenceConverter', {
- singleton: true,
-
- wktToGeometry: function (mapView, wkt) {
- var geometry, projection, resolutionAtEquator, pointResolution, resolutionFactor, points = [], center, radius,
- content, i, lat, lon, coordinates;
- if (wkt.lastIndexOf('POLYGON', 0) === 0) {
- content = wkt.match(/\([^\(\)]+\)/);
- if (content !== null) {
- coordinates = content[0].match(/-?\d+\.?\d*/g);
- if (coordinates !== null) {
- projection = mapView.getProjection();
- for (i = 0; i < coordinates.length; i += 2) {
- lat = Number(coordinates[i]);
- lon = Number(coordinates[i + 1]);
- points.push(ol.proj.transform([lon, lat], 'EPSG:4326', projection));
- }
- geometry = new ol.geom.Polygon([points]);
- }
- }
- } else if (wkt.lastIndexOf('CIRCLE', 0) === 0) {
- content = wkt.match(/\([^\(\)]+\)/);
- if (content !== null) {
- coordinates = content[0].match(/-?\d+\.?\d*/g);
- if (coordinates !== null) {
- projection = mapView.getProjection();
- center = ol.proj.transform([Number(coordinates[1]), Number(coordinates[0])], 'EPSG:4326', projection);
- resolutionAtEquator = mapView.getResolution();
- pointResolution = projection.getPointResolution(resolutionAtEquator, center);
- resolutionFactor = resolutionAtEquator / pointResolution;
- radius = (Number(coordinates[2]) / ol.proj.METERS_PER_UNIT.m) * resolutionFactor;
- geometry = new ol.geom.Circle(center, radius);
- }
- }
- }
- return geometry;
- },
-
- geometryToWkt: function (projection, geometry) {
- var result, i, center, radius, edgeCoordinate, earthSphere, groundRadius, points;
- if (geometry instanceof ol.geom.Circle) {
- center = geometry.getCenter();
- radius = geometry.getRadius();
- edgeCoordinate = [center[0] + radius, center[1]];
- center = ol.proj.transform(center, projection, 'EPSG:4326');
- earthSphere = new ol.Sphere(6378137);
- groundRadius = earthSphere.haversineDistance(center,
- ol.proj.transform(edgeCoordinate, projection, 'EPSG:4326'));
- result = 'CIRCLE (';
- result += center[1] + ' ' + center[0] + ', ';
- result += Number((groundRadius).toFixed(1)) + ')';
- } else if (geometry instanceof ol.geom.Polygon) {
- geometry.transform(projection, 'EPSG:4326');
- points = geometry.getCoordinates();
- result = 'POLYGON((';
- for (i = 0; i < points[0].length; i += 1) {
- result += points[0][i][1] + ' ' + points[0][i][0] + ', ';
- }
- result = result.substring(0, result.length - 2) + '))';
- }
- return result;
- }
-});
diff --git a/web/app/Style.js b/web/app/Style.js
deleted file mode 100644
index b3b296b75..000000000
--- a/web/app/Style.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.Style', {
- singleton: true,
-
- panelPadding: 10,
-
- windowWidth: 640,
- windowHeight: 480,
-
- dateTimeFormat24: 'Y-m-d H:i:s',
- dateTimeFormat12: 'Y-m-d g:i:s a',
- timeFormat24: 'H:i',
- timeFormat12: 'g:i a',
- dateFormat: 'Y-m-d',
- weekStartDay: 1,
-
- deviceWidth: 350,
-
- reportHeight: 250,
- reportTime: 100,
-
- mapDefaultLat: 51.507222,
- mapDefaultLon: -0.1275,
- mapDefaultZoom: 6,
-
- mapRouteColor: [
- 'rgba(21, 127, 204, 1.0)',
- 'rgba(109, 46, 204, 1.0)',
- 'rgba(204, 46, 162, 1.0)',
- 'rgba(204, 46, 38, 1.0)',
- 'rgba(128, 204, 46, 1.0)',
- 'rgba(46, 204, 155, 1.0)'
- ],
- mapRouteWidth: 5,
-
- mapArrowStrokeColor: 'rgba(50, 50, 50, 1.0)',
- mapArrowStrokeWidth: 2,
-
- mapTextColor: 'rgba(50, 50, 50, 1.0)',
- mapTextStrokeColor: 'rgba(255, 255, 255, 1.0)',
- mapTextStrokeWidth: 2,
- mapTextOffset: 10,
- mapTextFont: 'bold 12px sans-serif',
-
- mapColorOnline: 'rgba(77, 250, 144, 1.0)',
- mapColorUnknown: 'rgba(250, 190, 77, 1.0)',
- mapColorOffline: 'rgba(255, 84, 104, 1.0)',
-
- mapRadiusNormal: 9,
- mapRadiusSelected: 14,
-
- mapMaxZoom: 19,
- mapDelay: 500,
-
- mapGeofenceColor: 'rgba(21, 127, 204, 1.0)',
- mapGeofenceOverlay: 'rgba(21, 127, 204, 0.2)',
- mapGeofenceWidth: 5,
- mapGeofenceRadius: 9,
-
- coordinatePrecision: 6,
- numberPrecision: 2,
-
- reportTagfieldWidth: 375
-});
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
deleted file mode 100644
index 26f2f6f29..000000000
--- a/web/app/controller/Root.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.controller.Root', {
- extend: 'Ext.app.Controller',
-
- requires: [
- 'Traccar.view.Login',
- 'Traccar.view.Main',
- 'Traccar.view.MainMobile',
- 'Traccar.model.Position'
- ],
-
- init: function () {
- var indicator = document.createElement('div');
- indicator.className = 'state-indicator';
- document.body.appendChild(indicator);
- this.isPhone = parseInt(window.getComputedStyle(indicator).getPropertyValue('z-index'), 10) !== 0;
- },
-
- onLaunch: function () {
- Ext.Ajax.request({
- scope: this,
- url: 'api/server',
- callback: this.onServerReturn
- });
- },
-
- onServerReturn: function (options, success, response) {
- Ext.get('spinner').remove();
- if (success) {
- Traccar.app.setServer(Ext.decode(response.responseText));
- Ext.Ajax.request({
- scope: this,
- url: 'api/session',
- callback: this.onSessionReturn
- });
- } else {
- Traccar.app.showError(response);
- }
- },
-
- onSessionReturn: function (options, success, response) {
- if (success) {
- Traccar.app.setUser(Ext.decode(response.responseText));
- this.loadApp();
- } else {
- this.login = Ext.create('widget.login', {
- listeners: {
- scope: this,
- login: this.onLogin
- }
- });
- this.login.show();
- }
- },
-
- onLogin: function () {
- this.login.close();
- this.loadApp();
- },
-
- loadApp: function () {
- var attribution;
- Ext.getStore('Groups').load();
- Ext.getStore('Geofences').load();
- Ext.getStore('Devices').load({
- scope: this,
- callback: function () {
- this.asyncUpdate(true);
- }
- });
- attribution = Ext.get('attribution');
- if (attribution) {
- attribution.remove();
- }
- if (this.isPhone) {
- Ext.create('widget.mainMobile');
- } else {
- Ext.create('widget.main');
- }
- },
-
- beep: function () {
- if (!this.beepSound) {
- this.beepSound = new Audio('beep.wav');
- }
- this.beepSound.play();
- },
-
- mutePressed: function () {
- var muteButton = Ext.getCmp('muteButton');
- return muteButton && !muteButton.pressed;
- },
-
- asyncUpdate: function (first) {
- var protocol, socket, self = this;
- protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
- socket = new WebSocket(protocol + '//' + window.location.host + window.location.pathname + 'api/socket');
-
- socket.onclose = function (event) {
- self.asyncUpdate(false);
- };
-
- socket.onmessage = function (event) {
- var i, j, store, data, array, entity, device, typeKey, alarmKey, text, geofence;
-
- data = Ext.decode(event.data);
-
- if (data.devices) {
- array = data.devices;
- store = Ext.getStore('Devices');
- for (i = 0; i < array.length; i++) {
- entity = store.getById(array[i].id);
- if (entity) {
- entity.set({
- status: array[i].status,
- lastUpdate: array[i].lastUpdate
- }, {
- dirty: false
- });
- }
- }
- }
-
- if (data.positions && !data.events) {
- array = data.positions;
- store = Ext.getStore('LatestPositions');
- for (i = 0; i < array.length; i++) {
- entity = store.findRecord('deviceId', array[i].deviceId, 0, false, false, true);
- if (entity) {
- entity.set(array[i]);
- } else {
- store.add(Ext.create('Traccar.model.Position', array[i]));
- }
- }
- }
-
- if (data.events) {
- array = data.events;
- store = Ext.getStore('Events');
- for (i = 0; i < array.length; i++) {
- store.add(array[i]);
- if (array[i].type === 'commandResult' && data.positions) {
- for (j = 0; j < data.positions.length; j++) {
- if (data.positions[j].id === array[i].positionId) {
- text = data.positions[j].attributes.result;
- break;
- }
- }
- text = Strings.eventCommandResult + ': ' + text;
- } else if (array[i].type === 'alarm' && data.positions) {
- alarmKey = 'alarm';
- text = Strings[alarmKey];
- if (!text) {
- text = alarmKey;
- }
- for (j = 0; j < data.positions.length; j++) {
- if (data.positions[j].id === array[i].positionId && data.positions[j].attributes.alarm !== null) {
- if (typeof data.positions[j].attributes.alarm === 'string' && data.positions[j].attributes.alarm.length >= 2) {
- alarmKey = 'alarm' + data.positions[j].attributes.alarm.charAt(0).toUpperCase() + data.positions[j].attributes.alarm.slice(1);
- text = Strings[alarmKey];
- if (!text) {
- text = alarmKey;
- }
- }
- break;
- }
- }
- } else {
- typeKey = 'event' + array[i].type.charAt(0).toUpperCase() + array[i].type.slice(1);
- text = Strings[typeKey];
- if (!text) {
- text = typeKey;
- }
- }
- if (array[i].geofenceId !== 0) {
- geofence = Ext.getStore('Geofences').getById(array[i].geofenceId);
- if (typeof geofence !== 'undefined') {
- text += ' \"' + geofence.get('name') + '"';
- }
- }
- device = Ext.getStore('Devices').getById(array[i].deviceId);
- if (typeof device !== 'undefined') {
- if (self.mutePressed()) {
- self.beep();
- }
- Ext.toast(text, device.get('name'));
- }
- }
- }
- };
- }
-});
diff --git a/web/app/model/Attribute.js b/web/app/model/Attribute.js
deleted file mode 100644
index 78acdb1d9..000000000
--- a/web/app/model/Attribute.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Attribute', {
- extend: 'Ext.data.Model',
-
- fields: [{
- name: 'priority',
- type: 'int'
- }, {
- name: 'name',
- type: 'string'
- }, {
- name: 'value',
- type: 'string'
- }]
-});
diff --git a/web/app/model/Command.js b/web/app/model/Command.js
deleted file mode 100644
index 3e848b57d..000000000
--- a/web/app/model/Command.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Command', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'deviceId',
- type: 'int'
- }, {
- name: 'type',
- type: 'string'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Device.js b/web/app/model/Device.js
deleted file mode 100644
index 100f50f5b..000000000
--- a/web/app/model/Device.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Device', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'name',
- type: 'string'
- }, {
- name: 'uniqueId',
- type: 'string'
- }, {
- name: 'status',
- type: 'string'
- }, {
- name: 'lastUpdate',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'groupId',
- type: 'int'
- }, {
- name: 'geofenceIds'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Event.js b/web/app/model/Event.js
deleted file mode 100644
index 698ebb535..000000000
--- a/web/app/model/Event.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Event', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'type',
- type: 'string'
- }, {
- name: 'serverTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'deviceId',
- type: 'int'
- }, {
- name: 'positionId',
- type: 'int'
- }, {
- name: 'geofenceId',
- type: 'int'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Geofence.js b/web/app/model/Geofence.js
deleted file mode 100644
index a832455ac..000000000
--- a/web/app/model/Geofence.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Geofence', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'name',
- type: 'string'
- }, {
- name: 'description',
- type: 'string'
- }, {
- name: 'area',
- type: 'string'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Group.js b/web/app/model/Group.js
deleted file mode 100644
index bb18b5b3f..000000000
--- a/web/app/model/Group.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Group', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'name',
- type: 'string'
- }, {
- name: 'groupId',
- type: 'int'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Notification.js b/web/app/model/Notification.js
deleted file mode 100644
index 9b4d61eb4..000000000
--- a/web/app/model/Notification.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Notification', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'type',
- type: 'string'
- }, {
- name: 'userId',
- type: 'int'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/Position.js b/web/app/model/Position.js
deleted file mode 100644
index e559a7eab..000000000
--- a/web/app/model/Position.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Position', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'protocol',
- type: 'string'
- }, {
- name: 'deviceId',
- type: 'int'
- }, {
- name: 'serverTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'deviceTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'fixTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'valid',
- type: 'boolean'
- }, {
- name: 'latitude',
- type: 'float'
- }, {
- name: 'longitude',
- type: 'float'
- }, {
- name: 'altitude',
- type: 'float'
- }, {
- name: 'speed',
- type: 'float'
- }, {
- name: 'course',
- type: 'float'
- }, {
- name: 'address',
- type: 'string'
- }, {
- name: 'attributes'
- }]
-});
diff --git a/web/app/model/ReportSummary.js b/web/app/model/ReportSummary.js
deleted file mode 100644
index 430d00b9b..000000000
--- a/web/app/model/ReportSummary.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.ReportSummary', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'deviceId',
- type: 'int'
- }, {
- name: 'deviceName',
- type: 'string'
- }, {
- name: 'maxSpeed',
- type: 'float'
- }, {
- name: 'averageSpeed',
- type: 'float'
- }, {
- name: 'distance',
- type: 'float'
- }, {
- name: 'engineHours',
- type: 'int'
- }]
-});
diff --git a/web/app/model/ReportTrip.js b/web/app/model/ReportTrip.js
deleted file mode 100644
index cbd03d77a..000000000
--- a/web/app/model/ReportTrip.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.ReportTrip', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'deviceId',
- type: 'int'
- }, {
- name: 'deviceName',
- type: 'string'
- }, {
- name: 'maxSpeed',
- type: 'float'
- }, {
- name: 'averageSpeed',
- type: 'float'
- }, {
- name: 'distance',
- type: 'float'
- }, {
- name: 'duration',
- type: 'int'
- }, {
- name: 'startTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'startAddress',
- type: 'string'
- }, {
- name: 'endTime',
- type: 'date',
- dateFormat: 'c'
- }, {
- name: 'endAddress',
- type: 'string'
- }]
-});
diff --git a/web/app/model/Server.js b/web/app/model/Server.js
deleted file mode 100644
index 2ed8f12f4..000000000
--- a/web/app/model/Server.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.Server', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'registration',
- type: 'boolean'
- }, {
- name: 'readonly',
- type: 'boolean'
- }, {
- name: 'map',
- type: 'string'
- }, {
- name: 'bingKey',
- type: 'string'
- }, {
- name: 'mapUrl',
- type: 'string'
- }, {
- name: 'distanceUnit',
- type: 'string'
- }, {
- name: 'speedUnit',
- type: 'string'
- }, {
- name: 'latitude',
- type: 'float'
- }, {
- name: 'longitude',
- type: 'float'
- }, {
- name: 'zoom',
- type: 'int'
- }, {
- name: 'twelveHourFormat',
- type: 'boolean'
- }, {
- name: 'attributes'
- }],
-
- proxy: {
- type: 'ajax',
- url: 'api/server',
- actionMethods: {
- update: 'PUT'
- },
- writer: {
- type: 'json',
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/model/User.js b/web/app/model/User.js
deleted file mode 100644
index b162bada9..000000000
--- a/web/app/model/User.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.model.User', {
- extend: 'Ext.data.Model',
- identifier: 'negative',
-
- fields: [{
- name: 'id',
- type: 'int'
- }, {
- name: 'name',
- type: 'string'
- }, {
- name: 'email',
- type: 'string'
- }, {
- name: 'password',
- type: 'string'
- }, {
- name: 'admin',
- type: 'boolean'
- }, {
- name: 'map',
- type: 'string'
- }, {
- name: 'distanceUnit',
- type: 'string'
- }, {
- name: 'speedUnit',
- type: 'string'
- }, {
- name: 'latitude',
- type: 'float'
- }, {
- name: 'longitude',
- type: 'float'
- }, {
- name: 'zoom',
- type: 'int'
- }, {
- name: 'twelveHourFormat',
- type: 'boolean'
- }, {
- name: 'attributes'
- }],
-
- proxy: {
- type: 'rest',
- url: 'api/users',
- writer: {
- type: 'json',
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/store/AllDevices.js b/web/app/store/AllDevices.js
deleted file mode 100644
index 3f51926e3..000000000
--- a/web/app/store/AllDevices.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.AllDevices', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Device',
-
- proxy: {
- type: 'rest',
- url: 'api/devices',
- extraParams: {
- all: true
- }
- }
-});
diff --git a/web/app/store/AllGeofences.js b/web/app/store/AllGeofences.js
deleted file mode 100644
index 35209967b..000000000
--- a/web/app/store/AllGeofences.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.AllGeofences', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Geofence',
-
- proxy: {
- type: 'rest',
- url: 'api/geofences',
- extraParams: {
- all: true
- }
- }
-});
diff --git a/web/app/store/AllGroups.js b/web/app/store/AllGroups.js
deleted file mode 100644
index 8ce0cc2f6..000000000
--- a/web/app/store/AllGroups.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.AllGroups', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Group',
-
- proxy: {
- type: 'rest',
- url: 'api/groups',
- extraParams: {
- all: true
- }
- }
-});
diff --git a/web/app/store/AllNotifications.js b/web/app/store/AllNotifications.js
deleted file mode 100644
index 9e9cb791d..000000000
--- a/web/app/store/AllNotifications.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.AllNotifications', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Notification',
-
- proxy: {
- type: 'rest',
- url: 'api/users/notifications',
- extraParams: {
- all: true
- }
- },
- sortOnLoad: true,
- sorters: { property: 'type', direction : 'ASC' }
-});
diff --git a/web/app/store/Attributes.js b/web/app/store/Attributes.js
deleted file mode 100644
index 2019582e5..000000000
--- a/web/app/store/Attributes.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Attributes', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Attribute',
-
- sorters: [{
- property: 'priority'
- }]
-});
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js
deleted file mode 100644
index 48405db6f..000000000
--- a/web/app/store/CommandTypes.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2016 Gabor Somogyi (gabor.g.somogyi@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.CommandTypes', {
- extend: 'Ext.data.Store',
- fields: ['type', 'name'],
-
- listeners: {
- 'beforeload' : function (store) {
- var proxy;
- proxy = store.getProxy();
- proxy.setUrl('api/commandtypes?deviceId' + proxy.extraParams.deviceId);
- }
- },
-
- proxy: {
- type: 'rest',
- url: '',
- reader: {
- type: 'json',
- getData: function (data) {
- Ext.each(data, function (entry) {
- var nameKey, name;
- entry.name = entry.type;
- if (typeof entry.type !== 'undefined') {
- nameKey = 'command' + entry.type.charAt(0).toUpperCase() + entry.type.slice(1);
- name = Strings[nameKey];
- if (typeof name !== 'undefined') {
- entry.name = name;
- }
- }
- });
- return data;
- }
- }
- }
-});
diff --git a/web/app/store/Devices.js b/web/app/store/Devices.js
deleted file mode 100644
index c3c37331c..000000000
--- a/web/app/store/Devices.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Devices', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Device',
-
- proxy: {
- type: 'rest',
- url: 'api/devices',
- writer: {
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js
deleted file mode 100644
index 2805d52f0..000000000
--- a/web/app/store/DistanceUnits.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.DistanceUnits', {
- extend: 'Ext.data.Store',
- fields: ['key', 'name', 'factor'],
-
- data: [{
- key: 'km',
- name: Strings.sharedKm,
- factor: 0.001
- }, {
- key: 'mi',
- name: Strings.sharedMi,
- factor: 0.000621371
- }],
-
- formatValue: function (value, unit) {
- var model;
- if (!unit) {
- unit = 'km';
- }
- model = this.findRecord('key', unit);
- return (value * model.get('factor')).toFixed(2) + ' ' + model.get('name');
- }
-});
diff --git a/web/app/store/Events.js b/web/app/store/Events.js
deleted file mode 100644
index 2698933fe..000000000
--- a/web/app/store/Events.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Events', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Event',
-
- proxy: {
- type: 'rest',
- url: 'api/events'
- }
-});
diff --git a/web/app/store/GeofenceTypes.js b/web/app/store/GeofenceTypes.js
deleted file mode 100644
index 68c76bef1..000000000
--- a/web/app/store/GeofenceTypes.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.GeofenceTypes', {
- extend: 'Ext.data.Store',
- fields: ['key', 'name'],
-
- data: [{
- key: 'Polygon',
- name: Strings.mapShapePolygon
- }, {
- key: 'Circle',
- name: Strings.mapShapeCircle
- }]
-});
diff --git a/web/app/store/Geofences.js b/web/app/store/Geofences.js
deleted file mode 100644
index a0b01ae64..000000000
--- a/web/app/store/Geofences.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Geofences', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Geofence',
-
- proxy: {
- type: 'rest',
- url: 'api/geofences',
- writer: {
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/store/Groups.js b/web/app/store/Groups.js
deleted file mode 100644
index 8740b25d3..000000000
--- a/web/app/store/Groups.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Groups', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Group',
-
- proxy: {
- type: 'rest',
- url: 'api/groups',
- writer: {
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/store/Languages.js b/web/app/store/Languages.js
deleted file mode 100644
index 027c96bec..000000000
--- a/web/app/store/Languages.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Languages', {
- extend: 'Ext.data.Store',
- fields: ['code', 'name'],
-
- data: (function () {
- var code, data = [];
- for (code in Locale.languages) {
- if (Locale.languages.hasOwnProperty(code)) {
- data.push({
- code: code,
- name: Locale.languages[code].name
- });
- }
- }
- return data;
- })()
-});
diff --git a/web/app/store/LatestPositions.js b/web/app/store/LatestPositions.js
deleted file mode 100644
index c656bdcb8..000000000
--- a/web/app/store/LatestPositions.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.LatestPositions', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Position'
-});
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
deleted file mode 100644
index 4c26ad451..000000000
--- a/web/app/store/MapTypes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.MapTypes', {
- extend: 'Ext.data.Store',
- fields: ['key', 'name'],
-
- data: [{
- key: 'osm',
- name: Strings.mapOsm
- }, {
- key: 'bingRoad',
- name: Strings.mapBingRoad
- }, {
- key: 'bingAerial',
- name: Strings.mapBingAerial
- }, {
- key: 'custom',
- name: Strings.mapCustom
- }]
-});
diff --git a/web/app/store/Notifications.js b/web/app/store/Notifications.js
deleted file mode 100644
index 04cd9b863..000000000
--- a/web/app/store/Notifications.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Notifications', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Notification',
-
- proxy: {
- type: 'rest',
- url: 'api/users/notifications'
- }
-});
diff --git a/web/app/store/Positions.js b/web/app/store/Positions.js
deleted file mode 100644
index 8675983e5..000000000
--- a/web/app/store/Positions.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Positions', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Position',
-
- proxy: {
- type: 'rest',
- url: 'api/positions'
- }
-});
diff --git a/web/app/store/ReportEventTypes.js b/web/app/store/ReportEventTypes.js
deleted file mode 100644
index 27bc1fd5d..000000000
--- a/web/app/store/ReportEventTypes.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportEventTypes', {
- extend: 'Ext.data.Store',
- fields: ['type', 'name'],
-
- statics: {
- allEvents: '%'
- }
-});
diff --git a/web/app/store/ReportEvents.js b/web/app/store/ReportEvents.js
deleted file mode 100644
index 1759ffde8..000000000
--- a/web/app/store/ReportEvents.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportEvents', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Event',
-
- proxy: {
- type: 'rest',
- url: 'api/reports/events',
- headers: {
- 'Accept': 'application/json'
- }
- }
-});
diff --git a/web/app/store/ReportRoute.js b/web/app/store/ReportRoute.js
deleted file mode 100644
index ab6da94ce..000000000
--- a/web/app/store/ReportRoute.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportRoute', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.Position',
-
- proxy: {
- type: 'rest',
- url: 'api/reports/route',
- headers: {
- 'Accept': 'application/json'
- }
- }
-});
diff --git a/web/app/store/ReportSummary.js b/web/app/store/ReportSummary.js
deleted file mode 100644
index 7c9a4fca2..000000000
--- a/web/app/store/ReportSummary.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportSummary', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.ReportSummary',
-
- proxy: {
- type: 'rest',
- url: 'api/reports/summary',
- headers: {
- 'Accept': 'application/json'
- }
- }
-});
diff --git a/web/app/store/ReportTrips.js b/web/app/store/ReportTrips.js
deleted file mode 100644
index e0d86aa48..000000000
--- a/web/app/store/ReportTrips.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportTrips', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.ReportTrip',
-
- proxy: {
- type: 'rest',
- url: 'api/reports/trips',
- headers: {
- 'Accept': 'application/json'
- }
- }
-});
diff --git a/web/app/store/ReportTypes.js b/web/app/store/ReportTypes.js
deleted file mode 100644
index 09ef61db6..000000000
--- a/web/app/store/ReportTypes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.ReportTypes', {
- extend: 'Ext.data.Store',
- fields: ['key', 'name'],
-
- data: [{
- key: 'route',
- name: Strings.reportRoute
- }, {
- key: 'events',
- name: Strings.reportEvents
- }, {
- key: 'trips',
- name: Strings.reportTrips
- }, {
- key: 'summary',
- name: Strings.reportSummary
- }]
-});
diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js
deleted file mode 100644
index 296f58636..000000000
--- a/web/app/store/SpeedUnits.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.SpeedUnits', {
- extend: 'Ext.data.Store',
- fields: ['key', 'name', 'factor'],
-
- data: [{
- key: 'kn',
- name: Strings.sharedKn,
- factor: 1
- }, {
- key: 'kmh',
- name: Strings.sharedKmh,
- factor: 1.852
- }, {
- key: 'mph',
- name: Strings.sharedMph,
- factor: 1.15078
- }],
-
- formatValue: function (value, unit) {
- var model;
- if (!unit) {
- unit = 'kn';
- }
- model = this.findRecord('key', unit);
- return (value * model.get('factor')).toFixed(1) + ' ' + model.get('name');
- }
-});
diff --git a/web/app/store/TimeUnits.js b/web/app/store/TimeUnits.js
deleted file mode 100644
index e03263825..000000000
--- a/web/app/store/TimeUnits.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.TimeUnits', {
- extend: 'Ext.data.Store',
- fields: ['name', 'factor'],
-
- data: [{
- name: Strings.sharedSecond,
- factor: 1
- }, {
- name: Strings.sharedMinute,
- factor: 60
- }, {
- name: Strings.sharedHour,
- factor: 3600
- }]
-});
diff --git a/web/app/store/Users.js b/web/app/store/Users.js
deleted file mode 100644
index 53a49ff8c..000000000
--- a/web/app/store/Users.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.store.Users', {
- extend: 'Ext.data.Store',
- model: 'Traccar.model.User',
-
- proxy: {
- type: 'rest',
- url: 'api/users',
- writer: {
- writeAllFields: true
- }
- }
-});
diff --git a/web/app/view/AttributeController.js b/web/app/view/AttributeController.js
deleted file mode 100644
index 932a6436b..000000000
--- a/web/app/view/AttributeController.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.AttributeController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.attributeDialog',
-
- onSaveClick: function (button) {
- var dialog, store, record;
- dialog = button.up('window').down('form');
- dialog.updateRecord();
- record = dialog.getRecord();
- store = record.store;
- if (store) {
- if (record.phantom) {
- store.add(record);
- }
- store.sync({
- failure: function (batch) {
- store.rejectChanges();
- Traccar.app.showError(batch.exceptions[0].getError().response);
- }
- });
- } else {
- record.save();
- }
- button.up('window').close();
- }
-});
diff --git a/web/app/view/AttributeDialog.js b/web/app/view/AttributeDialog.js
deleted file mode 100644
index 213891ecd..000000000
--- a/web/app/view/AttributeDialog.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.AttributeDialog', {
- extend: 'Traccar.view.BaseDialog',
-
- requires: [
- 'Traccar.view.AttributeController'
- ],
-
- controller: 'attributeDialog',
- title: Strings.sharedAttribute,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName
- }, {
- xtype: 'textfield',
- name: 'value',
- fieldLabel: Strings.stateValue
- }]
- },
-
- buttons: [{
- text: Strings.sharedSave,
- handler: 'onSaveClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/Attributes.js b/web/app/view/Attributes.js
deleted file mode 100644
index 4bc7d5509..000000000
--- a/web/app/view/Attributes.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Attributes', {
- extend: 'Ext.grid.Panel',
- xtype: 'attributesView',
-
- requires: [
- 'Traccar.view.AttributesController',
- 'Traccar.view.EditToolbar'
- ],
-
- controller: 'attributes',
-
- selType: 'rowmodel',
-
- tbar: {
- xtype: 'editToolbar'
- },
-
- listeners: {
- selectionchange: 'onSelectionChange'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.stateValue,
- dataIndex: 'value',
- flex: 1
- }]
-});
diff --git a/web/app/view/AttributesController.js b/web/app/view/AttributesController.js
deleted file mode 100644
index 91d69a8e2..000000000
--- a/web/app/view/AttributesController.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.AttributesController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.attributes',
-
- requires: [
- 'Traccar.view.AttributeDialog',
- 'Traccar.store.Attributes',
- 'Traccar.model.Attribute'
- ],
-
- init: function () {
- var store, propertyName, i = 0, attributes;
- store = Ext.create('Traccar.store.Attributes');
- store.setProxy(Ext.create('Ext.data.proxy.Memory'));
- if (typeof this.getView().record.get('attributes') === 'undefined') {
- this.getView().record.set('attributes', {});
- }
- attributes = this.getView().record.get('attributes');
- for (propertyName in attributes) {
- if (attributes.hasOwnProperty(propertyName)) {
- store.add(Ext.create('Traccar.model.Attribute', {
- priority: i++,
- name: propertyName,
- value: this.getView().record.get('attributes')[propertyName]
- }));
- }
- }
- store.addListener('add', function (store, records, index, eOpts) {
- var i;
- for (i = 0; i < records.length; i++) {
- this.getView().record.get('attributes')[records[i].get('name')] = records[i].get('value');
- }
- this.getView().record.dirty = true;
- }, this);
- store.addListener('update', function (store, record, operation, modifiedFieldNames, details, eOpts) {
- if (operation === Ext.data.Model.EDIT) {
- if (record.modified.name !== record.get('name')) {
- delete this.getView().record.get('attributes')[record.modified.name];
- }
- this.getView().record.get('attributes')[record.get('name')] = record.get('value');
- this.getView().record.dirty = true;
- }
- }, this);
- store.addListener('remove', function (store, records, index, isMove, eOpts) {
- var i;
- for (i = 0; i < records.length; i++) {
- delete this.getView().record.get('attributes')[records[i].get('name')];
- }
- this.getView().record.dirty = true;
- }, this);
-
- this.getView().setStore(store);
- },
-
- onAddClick: function () {
- var attribute, dialog;
- attribute = Ext.create('Traccar.model.Attribute');
- attribute.store = this.getView().getStore();
- dialog = Ext.create('Traccar.view.AttributeDialog');
- dialog.down('form').loadRecord(attribute);
- dialog.show();
- },
-
- onEditClick: function () {
- var attribute, dialog;
- attribute = this.getView().getSelectionModel().getSelection()[0];
- dialog = Ext.create('Traccar.view.AttributeDialog');
- dialog.down('form').loadRecord(attribute);
- dialog.show();
- },
-
- onRemoveClick: function () {
- var attribute = this.getView().getSelectionModel().getSelection()[0];
- Ext.Msg.show({
- title: Strings.stateName,
- message: Strings.sharedRemoveConfirm,
- buttons: Ext.Msg.YESNO,
- buttonText: {
- yes: Strings.sharedRemove,
- no: Strings.sharedCancel
- },
- scope: this,
- fn: function (btn) {
- var store = this.getView().getStore();
- if (btn === 'yes') {
- store.remove(attribute);
- store.sync();
- }
- }
- });
- },
-
- onSelectionChange: function (selected) {
- var disabled = selected.length > 0;
- this.lookupReference('toolbarEditButton').setDisabled(disabled);
- this.lookupReference('toolbarRemoveButton').setDisabled(disabled);
- }
-});
diff --git a/web/app/view/BaseDialog.js b/web/app/view/BaseDialog.js
deleted file mode 100644
index fb09f12d1..000000000
--- a/web/app/view/BaseDialog.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BaseDialog', {
- extend: 'Ext.window.Window',
-
- bodyPadding: Traccar.Style.panelPadding,
- resizable: false,
- modal: true
-});
diff --git a/web/app/view/BaseEditDialog.js b/web/app/view/BaseEditDialog.js
deleted file mode 100644
index 1af095c98..000000000
--- a/web/app/view/BaseEditDialog.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BaseEditDialog', {
- extend: 'Traccar.view.BaseDialog',
-
- buttons: [{
- text: Strings.sharedAttributes,
- handler: 'showAttributesView'
- }, {
- xtype: 'tbfill'
- }, {
- text: Strings.sharedSave,
- handler: 'onSaveClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/BaseEditDialogController.js b/web/app/view/BaseEditDialogController.js
deleted file mode 100644
index 79fd8f2b4..000000000
--- a/web/app/view/BaseEditDialogController.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BaseEditDialogController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.baseEditDialog',
-
- requires: [
- 'Traccar.view.Attributes'
- ],
-
- onSaveClick: function (button) {
- var dialog, store, record;
- dialog = button.up('window').down('form');
- dialog.updateRecord();
- record = dialog.getRecord();
- store = record.store;
- if (store) {
- if (record.phantom) {
- store.add(record);
- }
- store.sync({
- failure: function (batch) {
- store.rejectChanges();
- Traccar.app.showError(batch.exceptions[0].getError().response);
- }
- });
- } else {
- record.save();
- }
- button.up('window').close();
- },
-
- showAttributesView: function (button) {
- var dialog, record;
- dialog = button.up('window').down('form');
- record = dialog.getRecord();
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedAttributes,
- modal: false,
- items: {
- xtype: 'attributesView',
- record: record
- }
- }).show();
- }
-});
diff --git a/web/app/view/BaseMap.js b/web/app/view/BaseMap.js
deleted file mode 100644
index 77646cbef..000000000
--- a/web/app/view/BaseMap.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BaseMap', {
- extend: 'Ext.form.Panel',
- xtype: 'baseMapView',
-
- layout: 'fit',
-
- getMap: function () {
- return this.map;
- },
-
- getMapView: function () {
- return this.mapView;
- },
-
- initMap: function () {
- var user, server, layer, type, bingKey, lat, lon, zoom, target;
-
- user = Traccar.app.getUser();
- server = Traccar.app.getServer();
-
- type = user.get('map') || server.get('map');
- bingKey = server.get('bingKey');
-
- if (type === 'custom') {
- layer = new ol.layer.Tile({
- source: new ol.source.XYZ({
- url: server.get('mapUrl'),
- attributions: [new ol.Attribution({
- html: ''
- })]
- })
- });
- } else if (type === 'bingRoad') {
- layer = new ol.layer.Tile({
- source: new ol.source.BingMaps({
- key: bingKey,
- imagerySet: 'Road'
- })
- });
- } else if (type === 'bingAerial') {
- layer = new ol.layer.Tile({
- source: new ol.source.BingMaps({
- key: bingKey,
- imagerySet: 'Aerial'
- })
- });
- } else {
- layer = new ol.layer.Tile({
- source: new ol.source.OSM({})
- });
- }
-
- lat = user.get('latitude') || server.get('latitude') || Traccar.Style.mapDefaultLat;
- lon = user.get('longitude') || server.get('longitude') || Traccar.Style.mapDefaultLon;
- zoom = user.get('zoom') || server.get('zoom') || Traccar.Style.mapDefaultZoom;
-
- this.mapView = new ol.View({
- center: ol.proj.fromLonLat([lon, lat]),
- zoom: zoom,
- maxZoom: Traccar.Style.mapMaxZoom
- });
-
- this.map = new ol.Map({
- target: this.body.dom.id,
- layers: [layer],
- view: this.mapView
- });
-
- target = this.map.getTarget();
- if (typeof target === 'string') {
- target = Ext.get(target).dom;
- }
-
- this.map.on('pointermove', function (e) {
- var hit = this.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
- return true;
- });
- if (hit) {
- target.style.cursor = 'pointer';
- } else {
- target.style.cursor = '';
- }
- });
-
- this.map.on('click', function (e) {
- this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
- this.fireEvent('selectFeature', feature);
- }, this);
- }, this);
- },
-
- listeners: {
- afterrender: function () {
- this.initMap();
- },
-
- resize: function () {
- this.map.updateSize();
- }
- }
-});
diff --git a/web/app/view/BasePermissionsController.js b/web/app/view/BasePermissionsController.js
deleted file mode 100644
index ea0efa901..000000000
--- a/web/app/view/BasePermissionsController.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BasePermissionsController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.basePermissionsController',
-
- init: function () {
- var params = {}, linkStoreName, storeName;
- params[this.getView().baseObjectName] = this.getView().baseObject;
- linkStoreName = this.getView().linkStoreName;
- storeName = this.getView().storeName;
- linkStoreName = (typeof linkStoreName === 'undefined') ? storeName : linkStoreName;
- this.getView().setStore(Ext.getStore(storeName));
- this.getView().getStore().load({
- scope: this,
- callback: function (records, operation, success) {
- var linkStore = Ext.create('Traccar.store.' + linkStoreName);
- linkStore.load({
- params: params,
- scope: this,
- callback: function (records, operation, success) {
- var i, index;
- if (success) {
- for (i = 0; i < records.length; i++) {
- index = this.getView().getStore().getById(records[i].getId());
- this.getView().getSelectionModel().select(index, true, true);
- }
- }
- }
- });
- }
- });
- },
-
- onBeforeSelect: function (object, record, index) {
- var data = {};
- data[this.getView().baseObjectName] = this.getView().baseObject;
- data[this.getView().linkObjectName] = record.getId();
- Ext.Ajax.request({
- scope: this,
- url: this.getView().urlApi,
- jsonData: Ext.util.JSON.encode(data),
- callback: function (options, success, response) {
- if (!success) {
- Traccar.app.showError(response);
- }
- }
- });
- },
-
- onBeforeDeselect: function (object, record, index) {
- var data = {};
- data[this.getView().baseObjectName] = this.getView().baseObject;
- data[this.getView().linkObjectName] = record.getId();
- Ext.Ajax.request({
- scope: this,
- method: 'DELETE',
- url: this.getView().urlApi,
- jsonData: Ext.util.JSON.encode(data),
- callback: function (options, success, response) {
- if (!success) {
- Traccar.app.showError(response);
- }
- }
- });
- }
-});
diff --git a/web/app/view/BaseWindow.js b/web/app/view/BaseWindow.js
deleted file mode 100644
index b6c777d1d..000000000
--- a/web/app/view/BaseWindow.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.BaseWindow', {
- extend: 'Ext.window.Window',
-
- width: Traccar.Style.windowWidth,
- height: Traccar.Style.windowHeight,
- layout: 'fit',
- modal: true
-});
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js
deleted file mode 100644
index a374ab0ef..000000000
--- a/web/app/view/CommandDialog.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.CommandDialog', {
- extend: 'Traccar.view.BaseDialog',
-
- requires: [
- 'Traccar.view.CommandDialogController'
- ],
-
- controller: 'commandDialog',
- title: Strings.commandTitle,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'combobox',
- name: 'type',
- fieldLabel: Strings.sharedType,
- store: 'CommandTypes',
- displayField: 'name',
- valueField: 'type',
- listeners: {
- select: 'onSelect'
- }
- }, {
- xtype: 'fieldcontainer',
- reference: 'paramPositionPeriodic',
- name: 'attributes',
- hidden: true,
-
- items: [{
- xtype: 'numberfield',
- fieldLabel: Strings.commandFrequency,
- name: 'frequency'
- }, {
- xtype: 'combobox',
- fieldLabel: Strings.commandUnit,
- name: 'unit',
- store: 'TimeUnits',
- displayField: 'name',
- valueField: 'factor'
- }]
- }, {
- xtype: 'fieldcontainer',
- reference: 'paramOutputControl',
- name: 'attributes',
- hidden: true,
-
- items: [{
- xtype: 'numberfield',
- fieldLabel: Strings.commandIndex,
- name: 'index',
- allowBlank: false
- }, {
- xtype: 'textfield',
- fieldLabel: Strings.commandData,
- name: 'data'
- }]
- }, {
- xtype: 'fieldcontainer',
- reference: 'paramSendSmsUssd',
- name: 'attributes',
- hidden: true,
-
- items: [{
- xtype: 'textfield',
- fieldLabel: Strings.commandPhone,
- name: 'phone'
- }, {
- xtype: 'textfield',
- reference: 'paramSmsMessage',
- fieldLabel: Strings.commandMessage,
- name: 'message',
- hidden: true
- }]
- }, {
- xtype: 'textfield',
- reference: 'paramCustom',
- fieldLabel: Strings.commandCustom,
- name: 'customCommand',
- hidden: true,
- allowBlank: false
- }]
- },
-
- buttons: [{
- text: Strings.commandSend,
- handler: 'onSendClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js
deleted file mode 100644
index 402006579..000000000
--- a/web/app/view/CommandDialogController.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.CommandDialogController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.commandDialog',
-
- onSelect: function (selected) {
- this.lookupReference('paramPositionPeriodic').setHidden(
- selected.getValue() !== 'positionPeriodic');
- this.lookupReference('paramOutputControl').setHidden(
- selected.getValue() !== 'outputControl');
- this.lookupReference('paramSendSmsUssd').setHidden(
- selected.getValue() !== 'sendSms' && selected.getValue() !== 'sendUssd');
- this.lookupReference('paramSmsMessage').setHidden(
- selected.getValue() !== 'sendSms');
- this.lookupReference('paramCustom').setHidden(
- selected.getValue() !== 'custom');
- },
-
- onSendClick: function (button) {
- var attributes, value, record, form, index, phone;
-
- form = button.up('window').down('form');
- form.updateRecord();
- record = form.getRecord();
-
- if (record.get('type') === 'positionPeriodic') {
- attributes = this.lookupReference('paramPositionPeriodic');
- value = attributes.down('numberfield[name="frequency"]').getValue();
- value *= attributes.down('combobox[name="unit"]').getValue();
-
- record.set('attributes', {
- frequency: value
- });
- }
-
- if (record.get('type') === 'outputControl') {
- attributes = this.lookupReference('paramOutputControl');
- index = attributes.down('numberfield[name="index"]').getValue();
- value = attributes.down('textfield[name="data"]').getValue();
-
- record.set('attributes', {
- index: index,
- data: value
- });
- }
-
- if (record.get('type') === 'sendUssd') {
- attributes = this.lookupReference('paramSendSmsUssd');
- phone = attributes.down('textfield[name="phone"]').getValue();
- record.set('attributes', {
- phone: phone
- });
- }
-
- if (record.get('type') === 'sendSms') {
- attributes = this.lookupReference('paramSendSmsUssd');
- phone = attributes.down('textfield[name="phone"]').getValue();
- value = attributes.down('textfield[name="message"]').getValue();
- record.set('attributes', {
- phone: phone,
- message: value
- });
- }
-
- if (record.get('type') === 'custom') {
- value = this.lookupReference('paramCustom').getValue();
- record.set('attributes', {
- data: value
- });
- }
-
- Ext.Ajax.request({
- scope: this,
- url: 'api/commands',
- jsonData: record.getData(),
- callback: this.onSendResult
- });
- },
-
- onSendResult: function (options, success, response) {
- if (success) {
- Ext.toast(Strings.commandSent);
- this.closeView();
- } else {
- Traccar.app.showError(response);
- }
- }
-});
diff --git a/web/app/view/CustomTimeField.js b/web/app/view/CustomTimeField.js
deleted file mode 100644
index 1bd8c7307..000000000
--- a/web/app/view/CustomTimeField.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.CustomTimeField', {
- extend: 'Ext.form.field.Time',
- xtype: 'customTimeField',
-
- constructor: function (config) {
- if (Traccar.app.getPreference('twelveHourFormat', false)) {
- config.format = Traccar.Style.timeFormat12;
- } else {
- config.format = Traccar.Style.timeFormat24;
- }
- this.callParent(arguments);
- }
-});
diff --git a/web/app/view/DeviceDialog.js b/web/app/view/DeviceDialog.js
deleted file mode 100644
index e88618fc5..000000000
--- a/web/app/view/DeviceDialog.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.DeviceDialog', {
- extend: 'Traccar.view.BaseEditDialog',
-
- requires: [
- 'Traccar.view.BaseEditDialog'
- ],
-
- controller: 'baseEditDialog',
- title: Strings.deviceDialog,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName,
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'uniqueId',
- fieldLabel: Strings.deviceIdentifier,
- allowBlank: false
- }, {
- xtype: 'combobox',
- name: 'groupId',
- fieldLabel: Strings.groupParent,
- store: 'Groups',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'id'
- }]
- }
-});
diff --git a/web/app/view/DeviceGeofences.js b/web/app/view/DeviceGeofences.js
deleted file mode 100644
index 9e2c12a77..000000000
--- a/web/app/view/DeviceGeofences.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.DeviceGeofences', {
- extend: 'Ext.grid.Panel',
- xtype: 'deviceGeofencesView',
-
- requires: [
- 'Traccar.view.BasePermissionsController'
- ],
-
- controller: 'basePermissionsController',
-
- selModel: {
- selType: 'checkboxmodel',
- checkOnly: true,
- showHeaderCheckbox: false
- },
-
- listeners: {
- beforedeselect: 'onBeforeDeselect',
- beforeselect: 'onBeforeSelect'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }]
-});
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js
deleted file mode 100644
index ab6436ea6..000000000
--- a/web/app/view/Devices.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Devices', {
- extend: 'Ext.grid.Panel',
- xtype: 'devicesView',
-
- requires: [
- 'Traccar.view.DevicesController',
- 'Traccar.view.EditToolbar',
- 'Traccar.view.SettingsMenu'
- ],
-
- controller: 'devices',
- rootVisible: false,
-
- initComponent: function () {
- this.store = Ext.create('Ext.data.ChainedStore', {
- source: 'Devices',
- groupField: 'groupId'
- });
- this.callParent();
- },
-
- title: Strings.deviceTitle,
- selType: 'rowmodel',
-
- tbar: {
- xtype: 'editToolbar',
- items: [{
- xtype: 'button',
- disabled: true,
- handler: 'onGeofencesClick',
- reference: 'toolbarGeofencesButton',
- glyph: 'xf21d@FontAwesome',
- tooltip: Strings.sharedGeofences,
- tooltipType: 'title'
- }, {
- disabled: true,
- handler: 'onCommandClick',
- reference: 'deviceCommandButton',
- glyph: 'xf093@FontAwesome',
- tooltip: Strings.deviceCommand,
- tooltipType: 'title'
- }, {
- xtype: 'tbfill'
- }, {
- id: 'muteButton',
- glyph: 'xf1f7@FontAwesome',
- tooltip: Strings.sharedMute,
- tooltipType: 'title',
- pressed : true,
- enableToggle: true,
- listeners: {
- toggle: function (button, pressed) {
- if (pressed) {
- button.setGlyph('xf1f7@FontAwesome');
- } else {
- button.setGlyph('xf0a2@FontAwesome');
- }
- },
- scope: this
- }
- }, {
- id: 'deviceFollowButton',
- glyph: 'xf05b@FontAwesome',
- tooltip: Strings.deviceFollow,
- tooltipType: 'title',
- enableToggle: true,
- toggleHandler: 'onFollowClick'
- }, {
- xtype: 'settingsMenu'
- }]
- },
-
- bbar: [{
- xtype: 'tbtext',
- html: Strings.groupParent
- }, {
- xtype: 'combobox',
- store: 'Groups',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'id',
- flex: 1,
- listeners: {
- change: function () {
- if (Ext.isNumber(this.getValue())) {
- this.up('grid').store.filter({
- id: 'groupFilter',
- filterFn: function (item) {
- var groupId, group, groupStore, filter = true;
- groupId = item.get('groupId');
- groupStore = Ext.getStore('Groups');
-
- while (groupId) {
- group = groupStore.getById(groupId);
- if (group) {
- if (group.get('id') === this.getValue()) {
- filter = false;
- break;
- }
- groupId = group.get('groupId');
- } else {
- groupId = 0;
- }
- }
-
- return !filter;
- },
- scope: this
- });
- } else {
- this.up('grid').store.removeFilter('groupFilter');
- }
- }
- }
- }, {
- xtype: 'tbtext',
- html: Strings.sharedSearch
- }, {
- xtype: 'textfield',
- flex: 1,
- listeners: {
- change: function () {
- this.up('grid').store.filter('name', this.getValue());
- }
- }
- }],
-
- listeners: {
- selectionchange: 'onSelectionChange'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.deviceLastUpdate,
- dataIndex: 'lastUpdate',
- flex: 1,
- renderer: function (value, metaData, record) {
- switch (record.get('status')) {
- case 'online':
- metaData.tdCls = 'view-color-green';
- break;
- case 'offline':
- metaData.tdCls = 'view-color-red';
- break;
- default:
- metaData.tdCls = 'view-color-yellow';
- break;
- }
- if (Traccar.app.getPreference('twelveHourFormat', false)) {
- return Ext.Date.format(value, Traccar.Style.dateTimeFormat12);
- } else {
- return Ext.Date.format(value, Traccar.Style.dateTimeFormat24);
- }
- }
- }]
-
-});
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js
deleted file mode 100644
index 6dcc45448..000000000
--- a/web/app/view/DevicesController.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.DevicesController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.devices',
-
- requires: [
- 'Traccar.view.CommandDialog',
- 'Traccar.view.DeviceDialog',
- 'Traccar.view.DeviceGeofences',
- 'Traccar.view.BaseWindow',
- 'Traccar.model.Device',
- 'Traccar.model.Command'
- ],
-
- config: {
- listen: {
- controller: {
- '*': {
- selectDevice: 'selectDevice',
- selectReport: 'selectReport'
- }
- },
- store: {
- '#Devices': {
- update: 'onUpdateDevice'
- }
- }
- }
- },
-
- init: function () {
- var readonly = Traccar.app.getServer().get('readonly') && !Traccar.app.getUser().get('admin');
- this.lookupReference('toolbarAddButton').setVisible(!readonly);
- this.lookupReference('toolbarEditButton').setVisible(!readonly);
- this.lookupReference('toolbarRemoveButton').setVisible(!readonly);
- this.lookupReference('toolbarGeofencesButton').setVisible(!readonly);
- },
-
- onAddClick: function () {
- var device, dialog;
- device = Ext.create('Traccar.model.Device');
- device.store = Ext.getStore('Devices');
- dialog = Ext.create('Traccar.view.DeviceDialog');
- dialog.down('form').loadRecord(device);
- dialog.show();
- },
-
- onEditClick: function () {
- var device, dialog;
- device = this.getView().getSelectionModel().getSelection()[0];
- dialog = Ext.create('Traccar.view.DeviceDialog');
- dialog.down('form').loadRecord(device);
- dialog.show();
- },
-
- onRemoveClick: function () {
- var device = this.getView().getSelectionModel().getSelection()[0];
- Ext.Msg.show({
- title: Strings.deviceDialog,
- message: Strings.sharedRemoveConfirm,
- buttons: Ext.Msg.YESNO,
- buttonText: {
- yes: Strings.sharedRemove,
- no: Strings.sharedCancel
- },
- fn: function (btn) {
- var store;
- if (btn === 'yes') {
- store = Ext.getStore('Devices');
- store.remove(device);
- store.sync();
- }
- }
- });
- },
-
- onGeofencesClick: function () {
- var device = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedGeofences,
- items: {
- xtype: 'deviceGeofencesView',
- baseObjectName: 'deviceId',
- linkObjectName: 'geofenceId',
- storeName: 'Geofences',
- urlApi: 'api/devices/geofences',
- baseObject: device.getId()
- }
- }).show();
- },
-
- onCommandClick: function () {
- var device, deviceId, command, dialog, comboStore;
- device = this.getView().getSelectionModel().getSelection()[0];
- deviceId = device.get('id');
- command = Ext.create('Traccar.model.Command');
- command.set('deviceId', deviceId);
- dialog = Ext.create('Traccar.view.CommandDialog');
- comboStore = dialog.down('form').down('combobox').getStore();
- comboStore.getProxy().setExtraParam('deviceId', deviceId);
- dialog.down('form').loadRecord(command);
- dialog.show();
- },
-
- onFollowClick: function (button, pressed) {
- var device;
- if (pressed) {
- device = this.getView().getSelectionModel().getSelection()[0];
- this.fireEvent('selectDevice', device, true);
- }
- },
-
- updateButtons: function (selected) {
- var empty = selected.getCount() === 0;
- this.lookupReference('toolbarEditButton').setDisabled(empty);
- this.lookupReference('toolbarRemoveButton').setDisabled(empty);
- this.lookupReference('toolbarGeofencesButton').setDisabled(empty);
- this.lookupReference('deviceCommandButton').setDisabled(empty || (selected.getLastSelected().get('status') !== 'online'));
- },
-
- onSelectionChange: function (selected) {
- this.updateButtons(selected);
- if (selected.getCount() > 0) {
- this.fireEvent('selectDevice', selected.getLastSelected(), true);
- }
- },
-
- selectDevice: function (device, center) {
- this.getView().getSelectionModel().select([device], false, true);
- },
-
- selectReport: function (position) {
- if (position !== undefined) {
- this.getView().getSelectionModel().deselectAll();
- }
- },
-
- onUpdateDevice: function (store, data) {
- this.updateButtons(this.getView().getSelectionModel());
- }
-});
diff --git a/web/app/view/EditToolbar.js b/web/app/view/EditToolbar.js
deleted file mode 100644
index 523d27e49..000000000
--- a/web/app/view/EditToolbar.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.EditToolbar', {
- extend: 'Ext.toolbar.Toolbar',
- xtype: 'editToolbar',
-
- initComponent: function () {
- this.callParent(arguments);
- this.add(0, [{
- xtype: 'button',
- handler: 'onAddClick',
- reference: 'toolbarAddButton',
- glyph: 'xf067@FontAwesome',
- tooltip: Strings.sharedAdd,
- tooltipType: 'title'
- }, {
- xtype: 'button',
- disabled: true,
- handler: 'onEditClick',
- reference: 'toolbarEditButton',
- glyph: 'xf040@FontAwesome',
- tooltip: Strings.sharedEdit,
- tooltipType: 'title'
- }, {
- xtype: 'button',
- disabled: true,
- handler: 'onRemoveClick',
- reference: 'toolbarRemoveButton',
- glyph: 'xf00d@FontAwesome',
- tooltip: Strings.sharedRemove,
- tooltipType: 'title'
- }]);
- }
-});
diff --git a/web/app/view/GeofenceDialog.js b/web/app/view/GeofenceDialog.js
deleted file mode 100644
index febef235e..000000000
--- a/web/app/view/GeofenceDialog.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GeofenceDialog', {
- extend: 'Traccar.view.BaseDialog',
-
- requires: [
- 'Traccar.view.GeofenceDialogController'
- ],
-
- controller: 'geofenceDialog',
- title: Strings.sharedGeofence,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName
- }, {
- xtype: 'textfield',
- name: 'description',
- fieldLabel: Strings.sharedDescription
- }, {
- xtype: 'hiddenfield',
- name: 'area',
- allowBlank: false,
- reference: 'areaField'
- }]
- },
-
- buttons: [{
- text: Strings.sharedArea,
- glyph: 'xf21d@FontAwesome',
- handler: 'onAreaClick'
- }, {
- xtype: 'tbfill'
- }, {
- text: Strings.sharedSave,
- handler: 'onSaveClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/GeofenceDialogController.js b/web/app/view/GeofenceDialogController.js
deleted file mode 100644
index b04935b9c..000000000
--- a/web/app/view/GeofenceDialogController.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GeofenceDialogController', {
- extend: 'Traccar.view.BaseEditDialogController',
- alias: 'controller.geofenceDialog',
-
- requires: [
- 'Traccar.view.GeofenceMap'
- ],
-
- config: {
- listen: {
- controller: {
- '*': {
- saveArea: 'saveArea'
- }
- }
- }
- },
-
- saveArea: function (value) {
- this.lookupReference('areaField').setValue(value);
- },
-
- onAreaClick: function (button) {
- var dialog, record;
- dialog = button.up('window').down('form');
- record = dialog.getRecord();
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedArea,
- items: {
- xtype: 'geofenceMapView',
- area: record.get('area')
- }
- }).show();
- }
-});
diff --git a/web/app/view/GeofenceMap.js b/web/app/view/GeofenceMap.js
deleted file mode 100644
index 933df2369..000000000
--- a/web/app/view/GeofenceMap.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GeofenceMap', {
- extend: 'Traccar.view.BaseMap',
- xtype: 'geofenceMapView',
-
- requires: [
- 'Traccar.view.GeofenceMapController',
- 'Traccar.GeofenceConverter'
- ],
-
- controller: 'geofenceMap',
- bodyBorder: true,
-
- tbar: {
- items: [{
- xtype: 'combobox',
- store: 'GeofenceTypes',
- valueField: 'key',
- displayField: 'name',
- listeners: {
- select: 'onTypeSelect'
- }
- }, {
- xtype: 'tbfill'
- }, {
- text: Strings.sharedSave,
- handler: 'onSaveClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'onCancelClick'
- }]
- },
-
- getFeatures: function () {
- return this.features;
- },
-
- initMap: function () {
- var map, featureOverlay, geometry;
- this.callParent();
-
- map = this.map;
-
- this.features = new ol.Collection();
- if (this.area !== '') {
- geometry = Traccar.GeofenceConverter.wktToGeometry(this.mapView, this.area);
- this.features.push(new ol.Feature(geometry));
- if (geometry instanceof ol.geom.Circle) {
- this.mapView.setCenter(geometry.getCenter());
- } else if (geometry instanceof ol.geom.Polygon) {
- this.mapView.setCenter(geometry.getCoordinates()[0][0]);
- }
- }
- featureOverlay = new ol.layer.Vector({
- source: new ol.source.Vector({
- features: this.features
- }),
- style: new ol.style.Style({
- fill: new ol.style.Fill({
- color: Traccar.Style.mapGeofenceOverlay
- }),
- stroke: new ol.style.Stroke({
- color: Traccar.Style.mapGeofenceColor,
- width: Traccar.Style.mapGeofenceWidth
- }),
- image: new ol.style.Circle({
- radius: Traccar.Style.mapGeofenceRadius,
- fill: new ol.style.Fill({
- color: Traccar.Style.mapGeofenceColor
- })
- })
- })
- });
- featureOverlay.setMap(map);
-
- map.addInteraction(new ol.interaction.Modify({
- features: this.features,
- deleteCondition: function (event) {
- return ol.events.condition.shiftKeyOnly(event) && ol.events.condition.singleClick(event);
- }
- }));
- },
-
- addInteraction: function (type) {
- this.draw = new ol.interaction.Draw({
- features: this.features,
- type: type
- });
- this.draw.on('drawstart', function () {
- this.features.clear();
- }, this);
- this.map.addInteraction(this.draw);
- },
-
- removeInteraction: function () {
- if (this.draw) {
- this.map.removeInteraction(this.draw);
- this.draw = null;
- }
- }
-});
diff --git a/web/app/view/GeofenceMapController.js b/web/app/view/GeofenceMapController.js
deleted file mode 100644
index d643c89e4..000000000
--- a/web/app/view/GeofenceMapController.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GeofenceMapController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.geofenceMap',
-
- requires: [
- 'Traccar.GeofenceConverter'
- ],
-
- onSaveClick: function (button) {
- var geometry, projection;
- if (this.getView().getFeatures().getLength() > 0) {
- geometry = this.getView().getFeatures().pop().getGeometry();
- projection = this.getView().getMapView().getProjection();
- this.fireEvent('saveArea', Traccar.GeofenceConverter.geometryToWkt(projection, geometry));
- button.up('window').close();
- }
- },
-
- onCancelClick: function (button) {
- button.up('window').close();
- },
-
- onTypeSelect: function (combo) {
- this.getView().removeInteraction();
- this.getView().addInteraction(combo.getValue());
- }
-});
diff --git a/web/app/view/Geofences.js b/web/app/view/Geofences.js
deleted file mode 100644
index 4a5fc9e38..000000000
--- a/web/app/view/Geofences.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Geofences', {
- extend: 'Ext.grid.Panel',
- xtype: 'geofencesView',
-
- requires: [
- 'Traccar.view.GeofencesController',
- 'Traccar.view.EditToolbar'
- ],
-
- controller: 'geofences',
- store: 'Geofences',
-
- selType: 'rowmodel',
-
- tbar: {
- xtype: 'editToolbar'
- },
-
- listeners: {
- selectionchange: 'onSelectionChange'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.sharedDescription,
- dataIndex: 'description',
- flex: 1
- }]
-});
diff --git a/web/app/view/GeofencesController.js b/web/app/view/GeofencesController.js
deleted file mode 100644
index 5faee139f..000000000
--- a/web/app/view/GeofencesController.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GeofencesController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.geofences',
-
- requires: [
- 'Traccar.view.GeofenceDialog',
- 'Traccar.model.Geofence'
- ],
-
- init: function () {
- Ext.getStore('Geofences').load();
- },
-
- onAddClick: function () {
- var geofence, dialog;
- geofence = Ext.create('Traccar.model.Geofence');
- geofence.store = this.getView().getStore();
- dialog = Ext.create('Traccar.view.GeofenceDialog');
- dialog.down('form').loadRecord(geofence);
- dialog.show();
- },
-
- onEditClick: function () {
- var geofence, dialog;
- geofence = this.getView().getSelectionModel().getSelection()[0];
- dialog = Ext.create('Traccar.view.GeofenceDialog');
- dialog.down('form').loadRecord(geofence);
- dialog.show();
- },
-
- onRemoveClick: function () {
- var geofence = this.getView().getSelectionModel().getSelection()[0];
- Ext.Msg.show({
- title: Strings.sharedGeofence,
- message: Strings.sharedRemoveConfirm,
- buttons: Ext.Msg.YESNO,
- buttonText: {
- yes: Strings.sharedRemove,
- no: Strings.sharedCancel
- },
- fn: function (btn) {
- var store = Ext.getStore('Geofences');
- if (btn === 'yes') {
- store.remove(geofence);
- store.sync();
- }
- }
- });
- },
-
- onSelectionChange: function (selected) {
- var disabled = selected.length > 0;
- this.lookupReference('toolbarEditButton').setDisabled(disabled);
- this.lookupReference('toolbarRemoveButton').setDisabled(disabled);
- }
-});
diff --git a/web/app/view/GroupDialog.js b/web/app/view/GroupDialog.js
deleted file mode 100644
index 032397a22..000000000
--- a/web/app/view/GroupDialog.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GroupDialog', {
- extend: 'Traccar.view.BaseEditDialog',
-
- requires: [
- 'Traccar.view.BaseEditDialogController'
- ],
-
- controller: 'baseEditDialog',
- title: Strings.groupDialog,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName,
- allowBlank: false
- }, {
- xtype: 'combobox',
- name: 'groupId',
- fieldLabel: Strings.groupParent,
- store: 'Groups',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'id'
- }]
- }
-});
diff --git a/web/app/view/GroupGeofences.js b/web/app/view/GroupGeofences.js
deleted file mode 100644
index 8ef2984ea..000000000
--- a/web/app/view/GroupGeofences.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GroupGeofences', {
- extend: 'Ext.grid.Panel',
- xtype: 'groupGeofencesView',
-
- requires: [
- 'Traccar.view.BasePermissionsController'
- ],
-
- controller: 'basePermissionsController',
-
- selModel: {
- selType: 'checkboxmodel',
- checkOnly: true,
- showHeaderCheckbox: false
- },
-
- listeners: {
- beforedeselect: 'onBeforeDeselect',
- beforeselect: 'onBeforeSelect'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }]
-});
diff --git a/web/app/view/Groups.js b/web/app/view/Groups.js
deleted file mode 100644
index 59d20df31..000000000
--- a/web/app/view/Groups.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Groups', {
- extend: 'Ext.grid.Panel',
- xtype: 'groupsView',
-
- requires: [
- 'Traccar.view.GroupsController',
- 'Traccar.view.EditToolbar'
- ],
-
- controller: 'groups',
- store: 'Groups',
-
- selType: 'rowmodel',
-
- tbar: {
- xtype: 'editToolbar',
- items: [{
- xtype: 'button',
- disabled: true,
- handler: 'onGeofencesClick',
- reference: 'toolbarGeofencesButton',
- glyph: 'xf21d@FontAwesome',
- tooltip: Strings.sharedGeofences,
- tooltipType: 'title'
- }]
- },
-
- listeners: {
- selectionchange: 'onSelectionChange'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }]
-});
diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js
deleted file mode 100644
index 06057fda0..000000000
--- a/web/app/view/GroupsController.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.GroupsController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.groups',
-
- requires: [
- 'Traccar.view.GroupDialog',
- 'Traccar.view.GroupGeofences',
- 'Traccar.view.BaseWindow',
- 'Traccar.model.Group'
- ],
-
- onAddClick: function () {
- var group, dialog;
- group = Ext.create('Traccar.model.Group');
- group.store = this.getView().getStore();
- dialog = Ext.create('Traccar.view.GroupDialog');
- dialog.down('form').loadRecord(group);
- dialog.show();
- },
-
- onEditClick: function () {
- var group, dialog;
- group = this.getView().getSelectionModel().getSelection()[0];
- dialog = Ext.create('Traccar.view.GroupDialog');
- dialog.down('form').loadRecord(group);
- dialog.show();
- },
-
- onRemoveClick: function () {
- var group = this.getView().getSelectionModel().getSelection()[0];
- Ext.Msg.show({
- title: Strings.groupDialog,
- message: Strings.sharedRemoveConfirm,
- buttons: Ext.Msg.YESNO,
- buttonText: {
- yes: Strings.sharedRemove,
- no: Strings.sharedCancel
- },
- fn: function (btn) {
- var store = Ext.getStore('Groups');
- if (btn === 'yes') {
- store.remove(group);
- store.sync();
- }
- }
- });
- },
-
- onGeofencesClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedGeofences,
- items: {
- xtype: 'groupGeofencesView',
- baseObjectName: 'groupId',
- linkObjectName: 'geofenceId',
- storeName: admin ? 'AllGeofences' : 'Geofences',
- urlApi: 'api/groups/geofences',
- baseObject: group.getId()
- }
- }).show();
- },
-
- onSelectionChange: function (selected) {
- var disabled = selected.length > 0;
- this.lookupReference('toolbarEditButton').setDisabled(disabled);
- this.lookupReference('toolbarRemoveButton').setDisabled(disabled);
- this.lookupReference('toolbarGeofencesButton').setDisabled(disabled);
- }
-});
diff --git a/web/app/view/Login.js b/web/app/view/Login.js
deleted file mode 100644
index db3c55261..000000000
--- a/web/app/view/Login.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Login', {
- extend: 'Traccar.view.BaseDialog',
- alias: 'widget.login',
-
- requires: [
- 'Traccar.view.LoginController'
- ],
-
- controller: 'login',
-
- title: Strings.loginTitle,
- closable: false,
- modal: false,
-
- items: {
- xtype: 'form',
- reference: 'form',
-
- autoEl: {
- tag: 'form',
- method: 'POST',
- action: 'fake-login.html',
- target: 'submitTarget'
- },
-
- items: [{
- xtype: 'combobox',
- name: 'language',
- fieldLabel: Strings.loginLanguage,
- store: 'Languages',
- displayField: 'name',
- valueField: 'code',
- submitValue: false,
- listeners: {
- select: 'onSelectLanguage'
- },
- reference: 'languageField'
- }, {
- xtype: 'textfield',
- name: 'email',
- reference: 'userField',
- fieldLabel: Strings.userEmail,
- allowBlank: false,
- enableKeyEvents: true,
- listeners: {
- specialKey: 'onSpecialKey',
- afterrender: 'onAfterRender'
- },
- inputAttrTpl: ['autocomplete="on"']
- }, {
- xtype: 'textfield',
- name: 'password',
- reference: 'passwordField',
- fieldLabel: Strings.userPassword,
- inputType: 'password',
- allowBlank: false,
- enableKeyEvents: true,
- listeners: {
- specialKey: 'onSpecialKey'
- },
- inputAttrTpl: ['autocomplete="on"']
- }, {
- xtype: 'checkboxfield',
- reference: 'rememberField',
- fieldLabel: Strings.userRemember
- }, {
- xtype: 'component',
- html: '<iframe id="submitTarget" name="submitTarget" style="display:none"></iframe>'
- }, {
- xtype: 'component',
- html: '<input type="submit" id="submitButton" style="display:none">'
- }]
- },
-
- buttons: [{
- text: Strings.loginRegister,
- handler: 'onRegisterClick',
- reference: 'registerButton'
- }, {
- text: Strings.loginLogin,
- handler: 'onLoginClick'
- }]
-});
diff --git a/web/app/view/LoginController.js b/web/app/view/LoginController.js
deleted file mode 100644
index 698cc7f9c..000000000
--- a/web/app/view/LoginController.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.LoginController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.login',
-
- requires: [
- 'Traccar.view.Register'
- ],
-
- init: function () {
- this.lookupReference('registerButton').setDisabled(
- !Traccar.app.getServer().get('registration'));
- this.lookupReference('languageField').setValue(Locale.language);
- },
-
- login: function () {
- var form = this.lookupReference('form');
- if (form.isValid()) {
- Ext.getBody().mask(Strings.sharedLoading);
- Ext.Ajax.request({
- scope: this,
- method: 'POST',
- url: 'api/session',
- params: form.getValues(),
- callback: function (options, success, response) {
- Ext.getBody().unmask();
- if (success) {
- if (this.lookupReference('rememberField').getValue()) {
- Ext.util.Cookies.set('user', this.lookupReference('userField').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
- Ext.util.Cookies.set('password', this.lookupReference('passwordField').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
- }
- Traccar.app.setUser(Ext.decode(response.responseText));
- this.fireViewEvent('login');
- } else {
- Traccar.app.showError(Strings.loginFailed);
- }
- }
- });
- }
- },
-
- logout: function () {
- Ext.util.Cookies.clear('user');
- Ext.util.Cookies.clear('password');
- Ext.Ajax.request({
- scope: this,
- method: 'DELETE',
- url: 'api/session',
- callback: function () {
- window.location.reload();
- }
- });
- },
-
- onSelectLanguage: function (selected) {
- var paramName, paramValue, url, prefix, suffix;
- paramName = 'locale';
- paramValue = selected.getValue();
- url = window.location.href;
- if (url.indexOf(paramName + '=') >= 0) {
- prefix = url.substring(0, url.indexOf(paramName));
- suffix = url.substring(url.indexOf(paramName));
- suffix = suffix.substring(suffix.indexOf('=') + 1);
- suffix = (suffix.indexOf('&') >= 0) ? suffix.substring(suffix.indexOf('&')) : '';
- url = prefix + paramName + '=' + paramValue + suffix;
- } else {
- if (url.indexOf('?') < 0) {
- url += '?' + paramName + '=' + paramValue;
- } else {
- url += '&' + paramName + '=' + paramValue;
- }
- }
- window.location.href = url;
- },
-
- onAfterRender: function (field) {
- field.focus();
- },
-
- onSpecialKey: function (field, e) {
- if (e.getKey() === e.ENTER) {
- this.login();
- }
- },
-
- onLoginClick: function () {
- Ext.getElementById('submitButton').click();
- this.login();
- },
-
- onRegisterClick: function () {
- Ext.create('Traccar.view.Register').show();
- }
-});
diff --git a/web/app/view/Main.js b/web/app/view/Main.js
deleted file mode 100644
index c15faab47..000000000
--- a/web/app/view/Main.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Main', {
- extend: 'Ext.container.Viewport',
- alias: 'widget.main',
-
- requires: [
- 'Traccar.view.Devices',
- 'Traccar.view.State',
- 'Traccar.view.Report',
- 'Traccar.view.Map'
- ],
-
- layout: 'border',
-
- defaults: {
- header: false,
- collapsible: true,
- split: true
- },
-
- items: [{
- region: 'west',
- layout: 'border',
- width: Traccar.Style.deviceWidth,
- title: Strings.devicesAndState,
-
- defaults: {
- split: true,
- flex: 1
- },
-
- items: [{
- region: 'center',
- xtype: 'devicesView'
- }, {
- region: 'south',
- xtype: 'stateView'
- }]
- }, {
- region: 'south',
- xtype: 'reportView',
- height: Traccar.Style.reportHeight,
- collapsed: true,
- titleCollapse: true,
- floatable: false
- }, {
- region: 'center',
- xtype: 'mapView',
- header: true,
- collapsible: false
- }]
-});
diff --git a/web/app/view/MainMobile.js b/web/app/view/MainMobile.js
deleted file mode 100644
index fe264260f..000000000
--- a/web/app/view/MainMobile.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.MainMobile', {
- extend: 'Ext.container.Viewport',
- alias: 'widget.mainMobile',
-
- requires: [
- 'Traccar.view.Devices',
- 'Traccar.view.State',
- 'Traccar.view.Map'
- ],
-
- layout: 'border',
-
- defaults: {
- header: false,
- collapsible: true,
- split: true
- },
-
- items: [{
- region: 'east',
- xtype: 'stateView',
- flex: 4,
- collapsed: true,
- titleCollapse: true,
- floatable: false
- }, {
- region: 'center',
- xtype: 'mapView',
- collapsible: false,
- flex: 2
- }, {
- region: 'south',
- xtype: 'devicesView',
- flex: 1
- }]
-});
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
deleted file mode 100644
index 8ff57c06a..000000000
--- a/web/app/view/Map.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Map', {
- extend: 'Traccar.view.BaseMap',
- xtype: 'mapView',
-
- requires: [
- 'Traccar.view.MapController'
- ],
-
- controller: 'map',
-
- title: Strings.mapTitle,
-
- getLatestSource: function () {
- return this.latestSource;
- },
-
- getRouteSource: function () {
- return this.routeSource;
- },
-
- getReportSource: function () {
- return this.reportSource;
- },
-
- initMap: function () {
- this.callParent();
-
- this.latestSource = new ol.source.Vector({});
- this.map.addLayer(new ol.layer.Vector({
- source: this.latestSource
- }));
-
- this.routeSource = new ol.source.Vector({});
- this.map.addLayer(new ol.layer.Vector({
- source: this.routeSource
- }));
-
- this.reportSource = new ol.source.Vector({});
- this.map.addLayer(new ol.layer.Vector({
- source: this.reportSource
- }));
- }
-});
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
deleted file mode 100644
index bc6a5d404..000000000
--- a/web/app/view/MapController.js
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.MapController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.map',
-
- config: {
- listen: {
- controller: {
- '*': {
- selectDevice: 'selectDevice',
- selectReport: 'selectReport'
- }
- },
- store: {
- '#Devices': {
- add: 'updateDevice',
- update: 'updateDevice'
- },
- '#LatestPositions': {
- add: 'updateLatest',
- update: 'updateLatest'
- },
- '#ReportRoute': {
- load: 'loadReport',
- clear: 'clearReport'
- }
- },
- component: {
- '#': {
- selectFeature: 'selectFeature'
- }
- }
- }
- },
-
- init: function () {
- this.latestMarkers = {};
- this.reportMarkers = {};
- },
-
- getDeviceColor: function (device) {
- switch (device.get('status')) {
- case 'online':
- return Traccar.Style.mapColorOnline;
- case 'offline':
- return Traccar.Style.mapColorOffline;
- default:
- return Traccar.Style.mapColorUnknown;
- }
- },
-
- changeMarkerColor: function (style, color) {
- return new ol.style.Style({
- image: new ol.style.Arrow({
- radius: style.getImage().getRadius(),
- fill: new ol.style.Fill({
- color: color
- }),
- stroke: style.getImage().getStroke(),
- rotation: style.getImage().getRotation()
- }),
- text: style.getText()
- });
- },
-
- updateDevice: function (store, data) {
- var i, device, deviceId, marker;
-
- if (!Ext.isArray(data)) {
- data = [data];
- }
-
- for (i = 0; i < data.length; i++) {
- device = data[i];
- deviceId = device.get('id');
-
- if (deviceId in this.latestMarkers) {
- marker = this.latestMarkers[deviceId];
- marker.setStyle(
- this.changeMarkerColor(marker.getStyle(), this.getDeviceColor(device)));
- }
- }
- },
-
- followSelected: function () {
- return Ext.getCmp('deviceFollowButton') && Ext.getCmp('deviceFollowButton').pressed;
- },
-
- updateLatest: function (store, data) {
- var i, position, geometry, device, deviceId, marker, style;
-
- if (!Ext.isArray(data)) {
- data = [data];
- }
-
- for (i = 0; i < data.length; i++) {
- position = data[i];
- deviceId = position.get('deviceId');
- device = Ext.getStore('Devices').findRecord('id', deviceId, 0, false, false, true);
-
- if (device) {
- geometry = new ol.geom.Point(ol.proj.fromLonLat([
- position.get('longitude'),
- position.get('latitude')
- ]));
-
- if (deviceId in this.latestMarkers) {
- marker = this.latestMarkers[deviceId];
- marker.setGeometry(geometry);
- } else {
- marker = new ol.Feature(geometry);
- marker.set('record', device);
- this.latestMarkers[deviceId] = marker;
- this.getView().getLatestSource().addFeature(marker);
-
- style = this.getLatestMarker(this.getDeviceColor(device));
- style.getText().setText(device.get('name'));
- marker.setStyle(style);
- }
-
- marker.getStyle().getImage().setRotation(position.get('course') * Math.PI / 180);
-
- if (marker === this.selectedMarker && this.followSelected()) {
- this.getView().getMapView().setCenter(marker.getGeometry().getCoordinates());
- }
- }
- }
- },
-
- loadReport: function (store, data) {
- var i, position, point, geometry, marker, style;
-
- this.clearReport(store);
-
- if (data.length > 0) {
- this.reportRoute = [];
- for (i = 0; i < data.length; i++) {
- if (i === 0 || data[i].get('deviceId') !== data[i - 1].get('deviceId')) {
- this.reportRoute.push(new ol.Feature({
- geometry: new ol.geom.LineString([])
- }));
- this.reportRoute[this.reportRoute.length - 1].setStyle(this.getRouteStyle(data[i].get('deviceId')));
- this.getView().getRouteSource().addFeature(this.reportRoute[this.reportRoute.length - 1]);
- }
- position = data[i];
-
- point = ol.proj.fromLonLat([
- position.get('longitude'),
- position.get('latitude')
- ]);
- geometry = new ol.geom.Point(point);
-
- marker = new ol.Feature(geometry);
- marker.set('record', position);
- this.reportMarkers[position.get('id')] = marker;
- this.getView().getReportSource().addFeature(marker);
-
- style = this.getReportMarker(position.get('deviceId'));
- style.getImage().setRotation(position.get('course') * Math.PI / 180);
- /*style.getText().setText(
- Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat24));*/
-
- marker.setStyle(style);
-
- this.reportRoute[this.reportRoute.length - 1].getGeometry().appendCoordinate(point);
- }
-
- this.getView().getMapView().fit(this.reportRoute[0].getGeometry(), this.getView().getMap().getSize());
- }
- },
-
- clearReport: function (store) {
- var key, i;
-
- if (this.reportRoute) {
- for (i = 0; i < this.reportRoute.length; i++) {
- this.getView().getRouteSource().removeFeature(this.reportRoute[i]);
- }
- this.reportRoute = null;
- }
-
- if (this.reportMarkers) {
- for (key in this.reportMarkers) {
- if (this.reportMarkers.hasOwnProperty(key)) {
- this.getView().getReportSource().removeFeature(this.reportMarkers[key]);
- }
- }
- this.reportMarkers = {};
- }
- },
-
- getRouteStyle: function (deviceId) {
- var index = 0;
- if (deviceId !== undefined) {
- index = deviceId % Traccar.Style.mapRouteColor.length;
- }
- return new ol.style.Style({
- stroke: new ol.style.Stroke({
- color: Traccar.Style.mapRouteColor[index],
- width: Traccar.Style.mapRouteWidth
- })
- });
- },
-
- getMarkerStyle: function (radius, color) {
- return new ol.style.Style({
- image: new ol.style.Arrow({
- radius: radius,
- fill: new ol.style.Fill({
- color: color
- }),
- stroke: new ol.style.Stroke({
- color: Traccar.Style.mapArrowStrokeColor,
- width: Traccar.Style.mapArrowStrokeWidth
- })
- }),
- text: new ol.style.Text({
- textBaseline: 'bottom',
- fill: new ol.style.Fill({
- color: Traccar.Style.mapTextColor
- }),
- stroke: new ol.style.Stroke({
- color: Traccar.Style.mapTextStrokeColor,
- width: Traccar.Style.mapTextStrokeWidth
- }),
- offsetY: -radius / 2 - Traccar.Style.mapTextOffset,
- font : Traccar.Style.mapTextFont
- })
- });
- },
-
- getLatestMarker: function (color) {
- return this.getMarkerStyle(
- Traccar.Style.mapRadiusNormal, color);
- },
-
- getReportMarker: function (deviceId) {
- var index = 0;
- if (deviceId !== undefined) {
- index = deviceId % Traccar.Style.mapRouteColor.length;
- }
- return this.getMarkerStyle(
- Traccar.Style.mapRadiusNormal, Traccar.Style.mapRouteColor[index]);
- },
-
- resizeMarker: function (style, radius) {
- return new ol.style.Style({
- image: new ol.style.Arrow({
- radius: radius,
- fill: style.getImage().getFill(),
- stroke: style.getImage().getStroke(),
- rotation: style.getImage().getRotation()
- }),
- text: style.getText()
- });
- },
-
- selectMarker: function (marker, center) {
- if (this.selectedMarker) {
- this.selectedMarker.setStyle(
- this.resizeMarker(this.selectedMarker.getStyle(), Traccar.Style.mapRadiusNormal));
- }
-
- if (marker) {
- marker.setStyle(
- this.resizeMarker(marker.getStyle(), Traccar.Style.mapRadiusSelected));
- if (center) {
- this.getView().getMapView().setCenter(marker.getGeometry().getCoordinates());
- }
- }
-
- this.selectedMarker = marker;
- },
-
- selectDevice: function (device, center) {
- this.selectMarker(this.latestMarkers[device.get('id')], center);
- },
-
- selectReport: function (position, center) {
- this.selectMarker(this.reportMarkers[position.get('id')], center);
- },
-
- selectFeature: function (feature) {
- var record = feature.get('record');
- if (record) {
- if (record instanceof Traccar.model.Device) {
- this.fireEvent('selectDevice', record, false);
- } else {
- this.fireEvent('selectReport', record, false);
- }
- }
- }
-});
diff --git a/web/app/view/Notifications.js b/web/app/view/Notifications.js
deleted file mode 100644
index 5ff5f061f..000000000
--- a/web/app/view/Notifications.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Notifications', {
- extend: 'Ext.grid.Panel',
- xtype: 'notificationsView',
-
- requires: [
- 'Traccar.view.NotificationsController'
- ],
-
- controller: 'notificationsController',
- store: 'AllNotifications',
-
- selModel: {
- selType: 'cellmodel'
- },
-
- viewConfig: {
- markDirty: false
- },
-
- columns: [{
- text: Strings.notificationType,
- dataIndex: 'type',
- flex: 1,
- renderer: function (value) {
- var typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1);
- return Strings[typeKey];
- }
- }, {
- text: Strings.notificationWeb,
- dataIndex: 'attributes.web',
- xtype: 'checkcolumn',
- flex: 1,
- listeners: {
- beforeCheckChange: 'onBeforeCheckChange',
- checkChange: 'onCheckChange'
- },
- renderer: function (value, metaData, record) {
- var fields = this.dataIndex.split('\.', 2);
- return (new Ext.ux.CheckColumn()).renderer(record.get(fields[0])[fields[1]], metaData);
- }
- }, {
- text: Strings.notificationMail,
- dataIndex: 'attributes.mail',
- xtype: 'checkcolumn',
- flex: 1,
- listeners: {
- beforeCheckChange: 'onBeforeCheckChange',
- checkChange: 'onCheckChange'
- },
- renderer: function (value, metaData, record) {
- var fields = this.dataIndex.split('\.', 2);
- return (new Ext.ux.CheckColumn()).renderer(record.get(fields[0])[fields[1]], metaData);
- }
- }]
-});
diff --git a/web/app/view/NotificationsController.js b/web/app/view/NotificationsController.js
deleted file mode 100644
index 4e041eb99..000000000
--- a/web/app/view/NotificationsController.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.NotificationsController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.notificationsController',
-
- requires: [
- 'Traccar.store.Notifications'
- ],
-
- init: function () {
- this.userId = this.getView().user.getId();
- this.getView().getStore().load({
- scope: this,
- callback: function (records, operation, success) {
- var notificationsStore = Ext.create('Traccar.store.Notifications');
- notificationsStore.load({
- params: {
- userId: this.userId
- },
- scope: this,
- callback: function (records, operation, success) {
- var i, index, attributes, storeRecord;
- if (success) {
- for (i = 0; i < records.length; i++) {
- index = this.getView().getStore().findExact('type', records[i].get('type'));
- attributes = records[i].get('attributes');
- storeRecord = this.getView().getStore().getAt(index);
- storeRecord.set('attributes', attributes);
- storeRecord.commit();
- }
- }
- }
- });
- }
- });
- },
-
- onBeforeCheckChange: function (column, rowIndex, checked, eOpts) {
- var fields, record, data;
- fields = column.dataIndex.split('\.', 2);
- record = this.getView().getStore().getAt(rowIndex);
- data = record.get(fields[0]);
- if (!data[fields[1]]) {
- data[fields[1]] = 'true';
- } else {
- delete data[fields[1]];
- }
- record.set(fields[0], data);
- record.commit();
- },
-
- onCheckChange: function (column, rowIndex, checked, eOpts) {
- var record = this.getView().getStore().getAt(rowIndex);
- Ext.Ajax.request({
- scope: this,
- url: 'api/users/notifications',
- jsonData: {
- userId: this.userId,
- type: record.get('type'),
- attributes: record.get('attributes')
- },
- callback: function (options, success, response) {
- if (!success) {
- Traccar.app.showError(response);
- }
- }
- });
- }
-});
diff --git a/web/app/view/Register.js b/web/app/view/Register.js
deleted file mode 100644
index 198e10b8f..000000000
--- a/web/app/view/Register.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Register', {
- extend: 'Traccar.view.BaseDialog',
-
- requires: [
- 'Traccar.view.RegisterController'
- ],
-
- controller: 'register',
-
- title: Strings.loginRegister,
-
- items: {
- xtype: 'form',
- reference: 'form',
- jsonSubmit: true,
-
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName,
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'email',
- fieldLabel: Strings.userEmail,
- vtype: 'email',
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'password',
- fieldLabel: Strings.userPassword,
- inputType: 'password',
- allowBlank: false
- }]
- },
-
- buttons: [{
- text: Strings.sharedSave,
- handler: 'onCreateClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/RegisterController.js b/web/app/view/RegisterController.js
deleted file mode 100644
index b79c5f59b..000000000
--- a/web/app/view/RegisterController.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.RegisterController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.register',
-
- onCreateClick: function () {
- var form = this.lookupReference('form');
- if (form.isValid()) {
- Ext.Ajax.request({
- scope: this,
- method: 'POST',
- url: 'api/users',
- jsonData: form.getValues(),
- callback: this.onCreateReturn
- });
- }
- },
-
- onCreateReturn: function (options, success, response) {
- if (success) {
- this.closeView();
- Ext.toast(Strings.loginCreated);
- } else {
- Traccar.app.showError(response);
- }
- }
-
-});
diff --git a/web/app/view/Report.js b/web/app/view/Report.js
deleted file mode 100644
index 7e77ef4f4..000000000
--- a/web/app/view/Report.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Report', {
- extend: 'Ext.grid.Panel',
- xtype: 'reportView',
-
- requires: [
- 'Traccar.view.ReportController'
- ],
-
- controller: 'report',
-
- title: Strings.reportTitle,
-
- tbar: [{
- xtype: 'tbtext',
- html: Strings.sharedType
- }, {
- xtype: 'combobox',
- reference: 'reportTypeField',
- store: 'ReportTypes',
- displayField: 'name',
- valueField: 'key',
- typeAhead: true,
- listeners: {
- change: 'onTypeChange'
- }
- }, '-', {
- text: Strings.reportConfigure,
- handler: 'onConfigureClick'
- }, '-', {
- text: Strings.reportShow,
- reference: 'showButton',
- disabled: true,
- handler: 'onReportClick'
- }, {
- text: Strings.reportCsv,
- reference: 'csvButton',
- disabled: true,
- handler: 'onReportClick'
- }, {
- text: Strings.reportClear,
- handler: 'onClearClick'
- }],
-
- listeners: {
- selectionchange: 'onSelectionChange'
- }
-});
diff --git a/web/app/view/ReportConfigController.js b/web/app/view/ReportConfigController.js
deleted file mode 100644
index df0c1ce4a..000000000
--- a/web/app/view/ReportConfigController.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.ReportConfigController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.reportConfigDialog',
-
- requires: [
- 'Traccar.store.ReportEventTypes',
- 'Traccar.store.AllNotifications'
- ],
-
- init: function () {
- var store = this.lookupReference('eventTypeField').getStore();
- if (store.getCount() === 0) {
- store.add({
- type: Traccar.store.ReportEventTypes.allEvents,
- name: Strings.eventAll
- });
- Ext.create('Traccar.store.AllNotifications').load({
- scope: this,
- callback: function (records, operation, success) {
- var i, value, name, typeKey;
- if (success) {
- for (i = 0; i < records.length; i++) {
- value = records[i].get('type');
- typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1);
- name = Strings[typeKey];
- store.add({type: value, name: name});
- }
- }
- }
- });
- }
- },
-
- onSaveClick: function (button) {
- var eventType;
- this.getView().callingPanel.deviceId = this.lookupReference('deviceField').getValue();
- this.getView().callingPanel.groupId = this.lookupReference('groupField').getValue();
- eventType = this.lookupReference('eventTypeField').getValue();
- if (eventType.indexOf(Traccar.store.ReportEventTypes.allEvents) > -1) {
- eventType = [Traccar.store.ReportEventTypes.allEvents];
- } else if (eventType.length === this.lookupReference('eventTypeField').getStore().getCount() - 1) {
- eventType = [Traccar.store.ReportEventTypes.allEvents];
- }
- this.getView().callingPanel.eventType = eventType;
- this.getView().callingPanel.fromDate = this.lookupReference('fromDateField').getValue();
- this.getView().callingPanel.fromTime = this.lookupReference('fromTimeField').getValue();
- this.getView().callingPanel.toDate = this.lookupReference('toDateField').getValue();
- this.getView().callingPanel.toTime = this.lookupReference('toTimeField').getValue();
- this.getView().callingPanel.updateButtons();
- button.up('window').close();
- }
-});
diff --git a/web/app/view/ReportConfigDialog.js b/web/app/view/ReportConfigDialog.js
deleted file mode 100644
index 547bd2975..000000000
--- a/web/app/view/ReportConfigDialog.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.ReportConfigDialog', {
- extend: 'Traccar.view.BaseDialog',
-
- requires: [
- 'Traccar.view.ReportConfigController',
- 'Traccar.view.CustomTimeField'
- ],
-
- controller: 'reportConfigDialog',
- title: Strings.reportConfigure,
-
- items: [{
- fieldLabel: Strings.reportDevice,
- xtype: 'tagfield',
- width: Traccar.Style.reportTagfieldWidth,
- reference: 'deviceField',
- store: 'Devices',
- valueField: 'id',
- displayField: 'name',
- queryMode: 'local'
- }, {
- fieldLabel: Strings.reportGroup,
- xtype: 'tagfield',
- width: Traccar.Style.reportTagfieldWidth,
- reference: 'groupField',
- store: 'Groups',
- valueField: 'id',
- displayField: 'name',
- queryMode: 'local'
- }, {
- fieldLabel: Strings.reportEventTypes,
- xtype: 'tagfield',
- width: Traccar.Style.reportTagfieldWidth,
- reference: 'eventTypeField',
- store: 'ReportEventTypes',
- hidden: true,
- valueField: 'type',
- displayField: 'name',
- queryMode: 'local'
- }, {
- xtype: 'fieldcontainer',
- layout: 'hbox',
- items: [{
- xtype: 'datefield',
- fieldLabel: Strings.reportFrom,
- reference: 'fromDateField',
- startDay: Traccar.Style.weekStartDay,
- format: Traccar.Style.dateFormat,
- value: new Date(new Date().getTime() - 30 * 60 * 1000)
- }, {
- xtype: 'customTimeField',
- reference: 'fromTimeField',
- maxWidth: Traccar.Style.reportTime,
- value: new Date(new Date().getTime() - 30 * 60 * 1000)
- }]
- }, {
- xtype: 'fieldcontainer',
- layout: 'hbox',
- items: [{
- xtype: 'datefield',
- fieldLabel: Strings.reportTo,
- reference: 'toDateField',
- startDay: Traccar.Style.weekStartDay,
- format: Traccar.Style.dateFormat,
- value: new Date()
- }, {
- xtype: 'customTimeField',
- reference: 'toTimeField',
- maxWidth: Traccar.Style.reportTime,
- value: new Date()
- }]
- }],
-
- buttons: [{
- text: Strings.sharedSave,
- handler: 'onSaveClick'
- }, {
- text: Strings.sharedCancel,
- handler: 'closeView'
- }]
-});
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
deleted file mode 100644
index 3a3345d83..000000000
--- a/web/app/view/ReportController.js
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
- * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.ReportController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.report',
-
- requires: [
- 'Traccar.AttributeFormatter',
- 'Traccar.view.ReportConfigDialog',
- 'Traccar.store.ReportEventTypes'
- ],
-
- config: {
- listen: {
- controller: {
- '*': {
- selectDevice: 'selectDevice',
- selectReport: 'selectReport'
- }
- }
- }
- },
-
- onConfigureClick: function () {
- var dialog = Ext.create('Traccar.view.ReportConfigDialog');
- dialog.lookupReference('eventTypeField').setHidden(this.lookupReference('reportTypeField').getValue() !== 'events');
- dialog.callingPanel = this;
- dialog.lookupReference('deviceField').setValue(this.deviceId);
- dialog.lookupReference('groupField').setValue(this.groupId);
- if (this.eventType !== undefined) {
- dialog.lookupReference('eventTypeField').setValue(this.eventType);
- } else {
- dialog.lookupReference('eventTypeField').setValue([Traccar.store.ReportEventTypes.allEvents]);
- }
- if (this.fromDate !== undefined) {
- dialog.lookupReference('fromDateField').setValue(this.fromDate);
- }
- if (this.fromTime !== undefined) {
- dialog.lookupReference('fromTimeField').setValue(this.fromTime);
- }
- if (this.toDate !== undefined) {
- dialog.lookupReference('toDateField').setValue(this.toDate);
- }
- if (this.toTime !== undefined) {
- dialog.lookupReference('toTimeField').setValue(this.toTime);
- }
- dialog.show();
- },
-
- updateButtons: function () {
- var reportType, disabled, devices, time;
- reportType = this.lookupReference('reportTypeField').getValue();
- devices = (this.deviceId && this.deviceId.length !== 0) || (this.groupId && this.groupId.length !== 0);
- time = this.fromDate && this.fromTime && this.toDate && this.toTime;
- disabled = !reportType || !devices || !time;
- this.lookupReference('showButton').setDisabled(disabled);
- this.lookupReference('csvButton').setDisabled(disabled);
- },
-
- onReportClick: function (button) {
- var reportType, from, to, store, url;
-
- reportType = this.lookupReference('reportTypeField').getValue();
-
- if (reportType && (this.deviceId || this.groupId)) {
- from = new Date(
- this.fromDate.getFullYear(), this.fromDate.getMonth(), this.fromDate.getDate(),
- this.fromTime.getHours(), this.fromTime.getMinutes(), this.fromTime.getSeconds(), this.fromTime.getMilliseconds());
-
- to = new Date(
- this.toDate.getFullYear(), this.toDate.getMonth(), this.toDate.getDate(),
- this.toTime.getHours(), this.toTime.getMinutes(), this.toTime.getSeconds(), this.toTime.getMilliseconds());
-
- if (button.reference === 'showButton') {
- store = this.getView().getStore();
- store.load({
- params: {
- deviceId: this.deviceId,
- groupId: this.groupId,
- type: this.eventType,
- from: from.toISOString(),
- to: to.toISOString()
- }
- });
- } else if (button.reference === 'csvButton') {
- url = this.getView().getStore().getProxy().url;
- this.downloadCsv(url, {
- deviceId: this.deviceId,
- groupId: this.groupId,
- type: this.eventType,
- from: from.toISOString(),
- to: to.toISOString()
- });
- }
- }
- },
-
- onClearClick: function () {
- this.getView().getStore().removeAll();
- },
-
- onSelectionChange: function (selected) {
- if (selected.getCount() > 0) {
- this.fireEvent('selectReport', selected.getLastSelected(), true);
- }
- },
-
- selectDevice: function (device) {
- if (device) {
- this.getView().getSelectionModel().deselectAll();
- }
- },
-
- selectReport: function (position, center) {
- if (position instanceof Traccar.model.Position) {
- this.getView().getSelectionModel().select([position], false, true);
- }
- },
-
- downloadCsv: function (requestUrl, requestParams) {
- Ext.Ajax.request({
- url: requestUrl,
- method: 'GET',
- params: requestParams,
- headers: {
- Accept: 'text/csv'
- },
- success: function (response) {
- var disposition, filename, type, blob, url, downloadUrl, elementA;
- disposition = response.getResponseHeader('Content-Disposition');
- filename = disposition.slice(disposition.indexOf('=') + 1, disposition.length);
- type = response.getResponseHeader('Content-Type');
- blob = new Blob([response.responseText], {type: type});
- if (typeof window.navigator.msSaveBlob !== 'undefined') {
- // IE workaround
- window.navigator.msSaveBlob(blob, filename);
- } else {
- url = window.URL || window.webkitURL;
- downloadUrl = url.createObjectURL(blob);
- if (filename) {
- elementA = document.createElement('a');
- elementA.href = downloadUrl;
- elementA.download = filename;
- document.body.appendChild(elementA);
- elementA.click();
- }
- setTimeout(function () {
- url.revokeObjectURL(downloadUrl);
- }, 100);
- }
- }
- });
- },
-
- onTypeChange: function (combobox, newValue, oldValue) {
- var routeColumns, eventsColumns, summaryColumns, tripsColumns;
- if (oldValue !== null) {
- this.onClearClick();
- }
- routeColumns = [{
- text: Strings.positionValid,
- dataIndex: 'valid',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('valid')
- }, {
- text: Strings.positionFixTime,
- dataIndex: 'fixTime',
- flex: 1,
- xtype: 'datecolumn',
- renderer: Traccar.AttributeFormatter.getFormatter('fixTime')
- }, {
- text: Strings.positionLatitude,
- dataIndex: 'latitude',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('latitude')
- }, {
- text: Strings.positionLongitude,
- dataIndex: 'longitude',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('latitude')
- }, {
- text: Strings.positionAltitude,
- dataIndex: 'altitude',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('altitude')
- }, {
- text: Strings.positionSpeed,
- dataIndex: 'speed',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('speed')
- }, {
- text: Strings.positionAddress,
- dataIndex: 'address',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('address')
- }];
-
- eventsColumns = [{
- text: Strings.positionFixTime,
- dataIndex: 'serverTime',
- flex: 1,
- xtype: 'datecolumn',
- renderer: Traccar.AttributeFormatter.getFormatter('serverTime')
- }, {
- text: Strings.reportDeviceName,
- dataIndex: 'deviceId',
- flex: 1,
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
- }, {
- text: Strings.sharedType,
- dataIndex: 'type',
- flex: 1,
- renderer: function (value) {
- var typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1);
- return Strings[typeKey];
- }
- }, {
- text: Strings.sharedGeofence,
- dataIndex: 'geofenceId',
- flex: 1,
- renderer: function (value) {
- if (value !== 0) {
- return Ext.getStore('Geofences').findRecord('id', value).get('name');
- }
- }
- }];
-
- summaryColumns = [{
- text: Strings.reportDeviceName,
- dataIndex: 'deviceId',
- flex: 1,
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
- }, {
- text: Strings.sharedDistance,
- dataIndex: 'distance',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('distance')
- }, {
- text: Strings.reportAverageSpeed,
- dataIndex: 'averageSpeed',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('speed')
- }, {
- text: Strings.reportMaximumSpeed,
- dataIndex: 'maxSpeed',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('speed')
- }, {
- text: Strings.reportEngineHours,
- dataIndex: 'engineHours',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('hours')
- }];
-
- tripsColumns = [{
- text: Strings.reportDeviceName,
- dataIndex: 'deviceId',
- flex: 1,
- renderer: function (value) {
- return Ext.getStore('Devices').findRecord('id', value).get('name');
- }
- }, {
- text: Strings.reportStartTime,
- dataIndex: 'startTime',
- flex: 1,
- xtype: 'datecolumn',
- renderer: Traccar.AttributeFormatter.getFormatter('startTime')
- }, {
- text: Strings.reportStartAddress,
- dataIndex: 'startAddress',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('address')
- }, {
- text: Strings.reportEndTime,
- dataIndex: 'endTime',
- flex: 1,
- xtype: 'datecolumn',
- renderer: Traccar.AttributeFormatter.getFormatter('endTime')
- }, {
- text: Strings.reportEndAddress,
- dataIndex: 'endAddress',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('address')
- }, {
- text: Strings.sharedDistance,
- dataIndex: 'distance',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('distance')
- }, {
- text: Strings.reportAverageSpeed,
- dataIndex: 'averageSpeed',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('speed')
- }, {
- text: Strings.reportMaximumSpeed,
- dataIndex: 'maxSpeed',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('speed')
- }, {
- text: Strings.reportDuration,
- dataIndex: 'duration',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('duration')
- }, {
- text: Strings.reportSpentFuel,
- dataIndex: 'spentFuel',
- flex: 1,
- renderer: Traccar.AttributeFormatter.getFormatter('spentFuel')
- }];
-
- if (newValue === 'route') {
- this.getView().reconfigure('ReportRoute', routeColumns);
- } else if (newValue === 'events') {
- this.getView().reconfigure('ReportEvents', eventsColumns);
- } else if (newValue === 'summary') {
- this.getView().reconfigure('ReportSummary', summaryColumns);
- } else if (newValue === 'trips') {
- this.getView().reconfigure('ReportTrips', tripsColumns);
- }
-
- this.updateButtons();
- }
-
-});
diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js
deleted file mode 100644
index dd4579168..000000000
--- a/web/app/view/ServerDialog.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.ServerDialog', {
- extend: 'Traccar.view.BaseEditDialog',
-
- requires: [
- 'Traccar.view.BaseEditDialogController'
- ],
-
- controller: 'baseEditDialog',
- title: Strings.serverTitle,
-
- items: {
- xtype: 'form',
- items: [{
- xtype: 'checkboxfield',
- name: 'registration',
- fieldLabel: Strings.serverRegistration,
- allowBlank: false
- }, {
- xtype: 'checkboxfield',
- name: 'readonly',
- fieldLabel: Strings.serverReadonly,
- allowBlank: false
- }, {
- xtype: 'combobox',
- name: 'map',
- fieldLabel: Strings.mapLayer,
- store: 'MapTypes',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'textfield',
- name: 'bingKey',
- fieldLabel: Strings.mapBingKey
- }, {
- xtype: 'textfield',
- name: 'mapUrl',
- fieldLabel: Strings.mapCustom
- }, {
- xtype: 'combobox',
- name: 'distanceUnit',
- fieldLabel: Strings.sharedDistance,
- store: 'DistanceUnits',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'combobox',
- name: 'speedUnit',
- fieldLabel: Strings.settingsSpeedUnit,
- store: 'SpeedUnits',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'numberfield',
- name: 'latitude',
- fieldLabel: Strings.positionLatitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- name: 'longitude',
- fieldLabel: Strings.positionLongitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- name: 'zoom',
- fieldLabel: Strings.serverZoom
- }, {
- xtype: 'checkboxfield',
- name: 'twelveHourFormat',
- fieldLabel: Strings.settingsTwelveHourFormat,
- allowBlank: false
- }]
- }
-});
diff --git a/web/app/view/SettingsMenu.js b/web/app/view/SettingsMenu.js
deleted file mode 100644
index bf184424c..000000000
--- a/web/app/view/SettingsMenu.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.SettingsMenu', {
- extend: 'Ext.button.Button',
- xtype: 'settingsMenu',
-
- requires: [
- 'Traccar.view.SettingsMenuController'
- ],
-
- glyph: 'xf013@FontAwesome',
- text: Strings.settingsTitle,
-
- menu: {
- controller: 'settings',
-
- items: [{
- text: Strings.settingsUser,
- handler: 'onUserClick'
- }, {
- hidden: true,
- text: Strings.settingsGroups,
- handler: 'onGroupsClick',
- reference: 'settingsGroupsButton'
- }, {
- hidden: true,
- text: Strings.sharedGeofences,
- handler: 'onGeofencesClick',
- reference: 'settingsGeofencesButton'
- }, {
- text: Strings.settingsServer,
- hidden: true,
- handler: 'onServerClick',
- reference: 'settingsServerButton'
- }, {
- text: Strings.settingsUsers,
- hidden: true,
- handler: 'onUsersClick',
- reference: 'settingsUsersButton'
- }, {
- hidden: true,
- text: Strings.sharedNotifications,
- handler: 'onNotificationsClick',
- reference: 'settingsNotificationsButton'
- }, {
- text: Strings.loginLogout,
- handler: 'onLogoutClick'
- }]
- }
-});
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
deleted file mode 100644
index ebaa7007d..000000000
--- a/web/app/view/SettingsMenuController.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.SettingsMenuController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.settings',
-
- requires: [
- 'Traccar.view.LoginController',
- 'Traccar.view.UserDialog',
- 'Traccar.view.ServerDialog',
- 'Traccar.view.Users',
- 'Traccar.view.Groups',
- 'Traccar.view.Geofences',
- 'Traccar.view.Notifications',
- 'Traccar.view.BaseWindow'
- ],
-
- init: function () {
- var admin, readonly;
- admin = Traccar.app.getUser().get('admin');
- readonly = Traccar.app.getServer().get('readonly');
- if (admin) {
- this.lookupReference('settingsServerButton').setHidden(false);
- this.lookupReference('settingsUsersButton').setHidden(false);
- }
- if (admin || !readonly) {
- this.lookupReference('settingsGroupsButton').setHidden(false);
- this.lookupReference('settingsGeofencesButton').setHidden(false);
- this.lookupReference('settingsNotificationsButton').setHidden(false);
- }
- },
-
- onUserClick: function () {
- var dialog = Ext.create('Traccar.view.UserDialog');
- dialog.down('form').loadRecord(Traccar.app.getUser());
- dialog.show();
- },
-
- onGroupsClick: function () {
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.settingsGroups,
- modal: false,
- items: {
- xtype: 'groupsView'
- }
- }).show();
- },
-
- onGeofencesClick: function () {
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedGeofences,
- modal: false,
- items: {
- xtype: 'geofencesView'
- }
- }).show();
- },
-
- onServerClick: function () {
- var dialog = Ext.create('Traccar.view.ServerDialog');
- dialog.down('form').loadRecord(Traccar.app.getServer());
- dialog.show();
- },
-
- onUsersClick: function () {
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.settingsUsers,
- modal: false,
- items: {
- xtype: 'usersView'
- }
- }).show();
- },
-
- onNotificationsClick: function () {
- var user = Traccar.app.getUser();
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedNotifications,
- modal: false,
- items: {
- xtype: 'notificationsView',
- user: user
- }
- }).show();
- },
-
- onLogoutClick: function () {
- Ext.create('Traccar.view.LoginController').logout();
- }
-});
diff --git a/web/app/view/State.js b/web/app/view/State.js
deleted file mode 100644
index 547fb0cf3..000000000
--- a/web/app/view/State.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.State', {
- extend: 'Ext.grid.Panel',
- xtype: 'stateView',
-
- requires: [
- 'Traccar.view.StateController'
- ],
-
- controller: 'state',
- store: 'Attributes',
-
- title: Strings.stateTitle,
-
- columns: [{
- text: Strings.stateName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.stateValue,
- dataIndex: 'value',
- flex: 1,
- renderer: function (value, metaData, record) {
- if (record.get('name') === 'Alarm') {
- metaData.tdCls = 'view-color-red';
- }
- return value;
- }
- }]
-});
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js
deleted file mode 100644
index 567a3925d..000000000
--- a/web/app/view/StateController.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.StateController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.state',
-
- requires: [
- 'Traccar.AttributeFormatter',
- 'Traccar.model.Attribute'
- ],
-
- config: {
- listen: {
- controller: {
- '*': {
- selectDevice: 'selectDevice',
- selectReport: 'selectReport'
- }
- },
- store: {
- '#LatestPositions': {
- add: 'updateLatest',
- update: 'updateLatest'
- },
- '#Positions': {
- clear: 'clearReport'
- }
- }
- }
- },
-
- keys: (function () {
- var i, list, result;
- result = {};
- list = ['fixTime', 'latitude', 'longitude', 'valid', 'altitude', 'speed', 'course', 'address', 'protocol'];
- for (i = 0; i < list.length; i++) {
- result[list[i]] = {
- priority: i,
- name: Strings['position' + list[i].replace(/^\w/g, function (s) {
- return s.toUpperCase();
- })]
- };
- }
- return result;
- }()),
-
- updateLatest: function (store, data) {
- var i;
- if (!Ext.isArray(data)) {
- data = [data];
- }
- for (i = 0; i < data.length; i++) {
- if (this.deviceId === data[i].get('deviceId')) {
- this.updatePosition(data[i]);
- }
- }
- },
-
- formatValue: function (value) {
- if (typeof (id) === 'number') {
- return Number(value.toFixed(2));
- } else {
- return value;
- }
- },
-
- updatePosition: function (position) {
- var attributes, store, key;
- store = Ext.getStore('Attributes');
- store.removeAll();
-
- for (key in position.data) {
- if (position.data.hasOwnProperty(key) && this.keys[key] !== undefined) {
- store.add(Ext.create('Traccar.model.Attribute', {
- priority: this.keys[key].priority,
- name: this.keys[key].name,
- value: Traccar.AttributeFormatter.getFormatter(key)(position.get(key))
- }));
- }
- }
-
- attributes = position.get('attributes');
- if (attributes instanceof Object) {
- for (key in attributes) {
- if (attributes.hasOwnProperty(key)) {
- store.add(Ext.create('Traccar.model.Attribute', {
- priority: 1024,
- name: key.replace(/^./, function (match) {
- return match.toUpperCase();
- }),
- value: Traccar.AttributeFormatter.getFormatter(key)(attributes[key])
- }));
- }
- }
- }
- },
-
- selectDevice: function (device) {
- var position;
- this.deviceId = device.get('id');
- position = Ext.getStore('LatestPositions').findRecord('deviceId', this.deviceId, 0, false, false, true);
- if (position) {
- this.updatePosition(position);
- } else {
- Ext.getStore('Attributes').removeAll();
- }
- },
-
- selectReport: function (position) {
- this.deviceId = null;
- this.updatePosition(position);
- },
-
- clearReport: function (store) {
- Ext.getStore('Attributes').removeAll();
- }
-});
diff --git a/web/app/view/UserDevices.js b/web/app/view/UserDevices.js
deleted file mode 100644
index 6a1a718aa..000000000
--- a/web/app/view/UserDevices.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UserDevices', {
- extend: 'Ext.grid.Panel',
- xtype: 'userDevicesView',
-
- requires: [
- 'Traccar.view.BasePermissionsController'
- ],
-
- controller: 'basePermissionsController',
-
- selModel: {
- selType: 'checkboxmodel',
- checkOnly: true,
- showHeaderCheckbox: false
- },
-
- listeners: {
- beforedeselect: 'onBeforeDeselect',
- beforeselect: 'onBeforeSelect'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.deviceIdentifier,
- dataIndex: 'uniqueId',
- flex: 1
- }]
-});
diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js
deleted file mode 100644
index 07fc1431f..000000000
--- a/web/app/view/UserDialog.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UserDialog', {
- extend: 'Traccar.view.BaseEditDialog',
-
- requires: [
- 'Traccar.view.UserDialogController'
- ],
-
- controller: 'userDialog',
- title: Strings.settingsUser,
-
- items: [{
- xtype: 'form',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName
- }, {
- xtype: 'textfield',
- name: 'email',
- fieldLabel: Strings.userEmail,
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'password',
- fieldLabel: Strings.userPassword,
- inputType: 'password',
- allowBlank: false
- }, {
- xtype: 'checkboxfield',
- name: 'admin',
- fieldLabel: Strings.userAdmin,
- allowBlank: false,
- disabled: true,
- reference: 'adminField'
- }, {
- xtype: 'combobox',
- name: 'map',
- fieldLabel: Strings.mapLayer,
- store: 'MapTypes',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'combobox',
- name: 'distanceUnit',
- fieldLabel: Strings.sharedDistance,
- store: 'DistanceUnits',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'combobox',
- name: 'speedUnit',
- fieldLabel: Strings.settingsSpeedUnit,
- store: 'SpeedUnits',
- displayField: 'name',
- valueField: 'key'
- }, {
- xtype: 'numberfield',
- name: 'latitude',
- fieldLabel: Strings.positionLatitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- name: 'longitude',
- fieldLabel: Strings.positionLongitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- name: 'zoom',
- fieldLabel: Strings.serverZoom
- }, {
- xtype: 'checkboxfield',
- name: 'twelveHourFormat',
- fieldLabel: Strings.settingsTwelveHourFormat,
- allowBlank: false
- }]
- }]
-});
diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js
deleted file mode 100644
index c3a4ca62d..000000000
--- a/web/app/view/UserDialogController.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UserDialogController', {
- extend: 'Traccar.view.BaseEditDialogController',
- alias: 'controller.userDialog',
-
- init: function () {
- if (Traccar.app.getUser().get('admin')) {
- this.lookupReference('adminField').setDisabled(false);
- }
- },
-
- onSaveClick: function (button) {
- var dialog, record, store;
- dialog = button.up('window').down('form');
- dialog.updateRecord();
- record = dialog.getRecord();
- if (record === Traccar.app.getUser()) {
- record.save();
- } else {
- store = Ext.getStore('Users');
- if (record.phantom) {
- store.add(record);
- }
- store.sync({
- failure: function (batch) {
- store.rejectChanges();
- Traccar.app.showError(batch.exceptions[0].getError().response);
- }
- });
- }
- button.up('window').close();
- }
-});
diff --git a/web/app/view/UserGeofences.js b/web/app/view/UserGeofences.js
deleted file mode 100644
index 03a02ff3b..000000000
--- a/web/app/view/UserGeofences.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UserGeofences', {
- extend: 'Ext.grid.Panel',
- xtype: 'userGeofencesView',
-
- requires: [
- 'Traccar.view.BasePermissionsController'
- ],
-
- controller: 'basePermissionsController',
-
- selModel: {
- selType: 'checkboxmodel',
- checkOnly: true,
- showHeaderCheckbox: false
- },
-
- listeners: {
- beforedeselect: 'onBeforeDeselect',
- beforeselect: 'onBeforeSelect'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }]
-});
diff --git a/web/app/view/UserGroups.js b/web/app/view/UserGroups.js
deleted file mode 100644
index 84032f021..000000000
--- a/web/app/view/UserGroups.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UserGroups', {
- extend: 'Ext.grid.Panel',
- xtype: 'userGroupsView',
-
- requires: [
- 'Traccar.view.BasePermissionsController'
- ],
-
- controller: 'basePermissionsController',
-
- selModel: {
- selType: 'checkboxmodel',
- checkOnly: true,
- showHeaderCheckbox: false
- },
-
- listeners: {
- beforedeselect: 'onBeforeDeselect',
- beforeselect: 'onBeforeSelect'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }]
-});
diff --git a/web/app/view/Users.js b/web/app/view/Users.js
deleted file mode 100644
index 4abfff1ef..000000000
--- a/web/app/view/Users.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.Users', {
- extend: 'Ext.grid.Panel',
- xtype: 'usersView',
-
- requires: [
- 'Traccar.view.UsersController',
- 'Traccar.view.EditToolbar'
- ],
-
- controller: 'users',
- store: 'Users',
-
- selType: 'rowmodel',
-
- tbar: {
- xtype: 'editToolbar',
- items: [{
- text: Strings.deviceTitle,
- disabled: true,
- handler: 'onDevicesClick',
- reference: 'userDevicesButton'
- }, {
- text: Strings.settingsGroups,
- disabled: true,
- handler: 'onGroupsClick',
- reference: 'userGroupsButton'
- }, {
- text: Strings.sharedGeofences,
- disabled: true,
- handler: 'onGeofencesClick',
- reference: 'userGeofencesButton'
- }, {
- text: Strings.sharedNotifications,
- disabled: true,
- handler: 'onNotificationsClick',
- reference: 'userNotificationsButton'
- }]
- },
-
- listeners: {
- selectionchange: 'onSelectionChange'
- },
-
- columns: [{
- text: Strings.sharedName,
- dataIndex: 'name',
- flex: 1
- }, {
- text: Strings.userEmail,
- dataIndex: 'email',
- flex: 1
- }, {
- text: Strings.userAdmin,
- dataIndex: 'admin',
- flex: 1
- }]
-});
diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js
deleted file mode 100644
index fad5f245e..000000000
--- a/web/app/view/UsersController.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-Ext.define('Traccar.view.UsersController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.users',
-
- requires: [
- 'Traccar.view.UserDialog',
- 'Traccar.view.UserDevices',
- 'Traccar.view.UserGroups',
- 'Traccar.view.UserGeofences',
- 'Traccar.view.Notifications',
- 'Traccar.view.BaseWindow',
- 'Traccar.model.User'
- ],
-
- init: function () {
- Ext.getStore('Users').load();
- },
-
- onAddClick: function () {
- var user, dialog;
- user = Ext.create('Traccar.model.User');
- dialog = Ext.create('Traccar.view.UserDialog');
- dialog.down('form').loadRecord(user);
- dialog.show();
- },
-
- onEditClick: function () {
- var user, dialog;
- user = this.getView().getSelectionModel().getSelection()[0];
- dialog = Ext.create('Traccar.view.UserDialog');
- dialog.down('form').loadRecord(user);
- dialog.show();
- },
-
- onRemoveClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- Ext.Msg.show({
- title: Strings.settingsUser,
- message: Strings.sharedRemoveConfirm,
- buttons: Ext.Msg.YESNO,
- buttonText: {
- yes: Strings.sharedRemove,
- no: Strings.sharedCancel
- },
- fn: function (btn) {
- var store = Ext.getStore('Users');
- if (btn === 'yes') {
- store.remove(user);
- store.sync();
- }
- }
- });
- },
-
- onDevicesClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.deviceTitle,
- items: {
- xtype: 'userDevicesView',
- baseObjectName: 'userId',
- linkObjectName: 'deviceId',
- storeName: 'AllDevices',
- linkStoreName: 'Devices',
- urlApi: 'api/permissions/devices',
- baseObject: user.getId()
- }
- }).show();
- },
-
- onGroupsClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.settingsGroups,
- items: {
- xtype: 'userGroupsView',
- baseObjectName: 'userId',
- linkObjectName: 'groupId',
- storeName: 'AllGroups',
- linkStoreName: 'Groups',
- urlApi: 'api/permissions/groups',
- baseObject: user.getId()
- }
- }).show();
- },
-
- onGeofencesClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedGeofences,
- items: {
- xtype: 'userGeofencesView',
- baseObjectName: 'userId',
- linkObjectName: 'geofenceId',
- storeName: 'AllGeofences',
- linkStoreName: 'Geofences',
- urlApi: 'api/permissions/geofences',
- baseObject: user.getId()
- }
- }).show();
- },
-
- onNotificationsClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- Ext.create('Traccar.view.BaseWindow', {
- title: Strings.sharedNotifications,
- modal: false,
- items: {
- xtype: 'notificationsView',
- user: user
- }
- }).show();
- },
-
- onSelectionChange: function (selected) {
- var disabled = selected.length > 0;
- this.lookupReference('toolbarEditButton').setDisabled(disabled);
- this.lookupReference('toolbarRemoveButton').setDisabled(disabled);
- this.lookupReference('userDevicesButton').setDisabled(disabled);
- this.lookupReference('userGroupsButton').setDisabled(disabled);
- this.lookupReference('userGeofencesButton').setDisabled(disabled);
- this.lookupReference('userNotificationsButton').setDisabled(disabled);
- }
-});
diff --git a/web/arrowstyle.js b/web/arrowstyle.js
deleted file mode 100644
index 1fd2b3c00..000000000
--- a/web/arrowstyle.js
+++ /dev/null
@@ -1,530 +0,0 @@
-goog.provide('ol.style.Arrow');
-
-goog.require('goog.asserts');
-goog.require('ol');
-goog.require('ol.color');
-goog.require('ol.dom');
-goog.require('ol.has');
-goog.require('ol.render.canvas');
-goog.require('ol.style.AtlasManager');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Image');
-goog.require('ol.style.ImageState');
-goog.require('ol.style.Stroke');
-
-
-
-/**
- * @classdesc
- * Set arrow style for vector features.
- *
- * @constructor
- * @param {olx.style.ArrowOptions} options Options.
- * @extends {ol.style.Image}
- * @api
- */
-ol.style.Arrow = function(options) {
-
- goog.asserts.assert(options.radius !== undefined,
- 'must provide "radius"');
-
- /**
- * @private
- * @type {Array.<string>}
- */
- this.checksums_ = null;
-
- /**
- * @private
- * @type {HTMLCanvasElement}
- */
- this.canvas_ = null;
-
- /**
- * @private
- * @type {HTMLCanvasElement}
- */
- this.hitDetectionCanvas_ = null;
-
- /**
- * @private
- * @type {ol.style.Fill}
- */
- this.fill_ = options.fill !== undefined ? options.fill : null;
-
- /**
- * @private
- * @type {Array.<number>}
- */
- this.origin_ = [0, 0];
-
- /**
- * @private
- * @type {number}
- */
- this.radius_ = /** @type {number} */ (options.radius !== undefined ?
- options.radius : options.radius1);
-
- /**
- * @private
- * @type {number}
- */
- this.frontAngle_ = options.frontAngle !== undefined ?
- options.frontAngle : Math.PI / 5;
-
- /**
- * @private
- * @type {number}
- */
- this.backAngle_ = options.backAngle !== undefined ?
- options.backAngle : 4 * Math.PI / 5;
-
- /**
- * @private
- * @type {ol.style.Stroke}
- */
- this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
- /**
- * @private
- * @type {Array.<number>}
- */
- this.anchor_ = null;
-
- /**
- * @private
- * @type {ol.Size}
- */
- this.size_ = null;
-
- /**
- * @private
- * @type {ol.Size}
- */
- this.imageSize_ = null;
-
- /**
- * @private
- * @type {ol.Size}
- */
- this.hitDetectionImageSize_ = null;
-
- this.render_(options.atlasManager);
-
- /**
- * @type {boolean}
- */
- var snapToPixel = options.snapToPixel !== undefined ?
- options.snapToPixel : true;
-
- /**
- * @type {boolean}
- */
- var rotateWithView = options.rotateWithView !== undefined ?
- options.rotateWithView : false;
-
- ol.style.Image.call(this, {
- opacity: 1,
- rotateWithView: rotateWithView,
- rotation: options.rotation !== undefined ? options.rotation : 0,
- scale: 1,
- snapToPixel: snapToPixel
- });
-
-};
-ol.inherits(ol.style.Arrow, ol.style.Image);
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Arrow.prototype.getAnchor = function() {
- return this.anchor_;
-};
-
-
-/**
- * Get front angle of the arrow.
- * @return {number} Angle in radians.
- * @api
- */
-ol.style.Arrow.prototype.getFrontAngle = function() {
- return this.frontAngle_;
-};
-
-
-/**
- * Get back angle of the arrow.
- * @return {number} Angle in radians.
- * @api
- */
-ol.style.Arrow.prototype.getBackAngle = function() {
- return this.backAngle_;
-};
-
-
-/**
- * Get the fill style for the arrow.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Arrow.prototype.getFill = function() {
- return this.fill_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.getHitDetectionImage = function(pixelRatio) {
- return this.hitDetectionCanvas_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Arrow.prototype.getImage = function(pixelRatio) {
- return this.canvas_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.getImageSize = function() {
- return this.imageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.getHitDetectionImageSize = function() {
- return this.hitDetectionImageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.getImageState = function() {
- return ol.style.ImageState.LOADED;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Arrow.prototype.getOrigin = function() {
- return this.origin_;
-};
-
-
-/**
- * Get the (primary) radius for the arrow.
- * @return {number} Radius.
- * @api
- */
-ol.style.Arrow.prototype.getRadius = function() {
- return this.radius_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Arrow.prototype.getSize = function() {
- return this.size_;
-};
-
-
-/**
- * Get the stroke style for the arrow.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Arrow.prototype.getStroke = function() {
- return this.stroke_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.listenImageChange = ol.nullFunction;
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.load = ol.nullFunction;
-
-
-/**
- * @inheritDoc
- */
-ol.style.Arrow.prototype.unlistenImageChange = ol.nullFunction;
-
-
-/**
- * @typedef {{
- * strokeStyle: (string|undefined),
- * strokeWidth: number,
- * size: number,
- * lineCap: string,
- * lineDash: Array.<number>,
- * lineJoin: string,
- * miterLimit: number
- * }}
- */
-ol.ArrowRenderOptions;
-
-
-/**
- * @private
- * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
- */
-ol.style.Arrow.prototype.render_ = function(atlasManager) {
- var imageSize;
- var lineCap = '';
- var lineJoin = '';
- var miterLimit = 0;
- var lineDash = null;
- var strokeStyle;
- var strokeWidth = 0;
-
- if (this.stroke_) {
- strokeStyle = ol.color.asString(this.stroke_.getColor());
- strokeWidth = this.stroke_.getWidth();
- if (strokeWidth === undefined) {
- strokeWidth = ol.render.canvas.defaultLineWidth;
- }
- lineDash = this.stroke_.getLineDash();
- if (!ol.has.CANVAS_LINE_DASH) {
- lineDash = null;
- }
- lineJoin = this.stroke_.getLineJoin();
- if (lineJoin === undefined) {
- lineJoin = ol.render.canvas.defaultLineJoin;
- }
- lineCap = this.stroke_.getLineCap();
- if (lineCap === undefined) {
- lineCap = ol.render.canvas.defaultLineCap;
- }
- miterLimit = this.stroke_.getMiterLimit();
- if (miterLimit === undefined) {
- miterLimit = ol.render.canvas.defaultMiterLimit;
- }
- }
-
- var size = 2 * (this.radius_ + strokeWidth) + 1;
-
- /** @type {ol.ArrowRenderOptions} */
- var renderOptions = {
- strokeStyle: strokeStyle,
- strokeWidth: strokeWidth,
- size: size,
- lineCap: lineCap,
- lineDash: lineDash,
- lineJoin: lineJoin,
- miterLimit: miterLimit
- };
-
- if (atlasManager === undefined) {
- // no atlas manager is used, create a new canvas
- var context = ol.dom.createCanvasContext2D(size, size);
- this.canvas_ = context.canvas;
-
- // canvas.width and height are rounded to the closest integer
- size = this.canvas_.width;
- imageSize = size;
-
- this.draw_(renderOptions, context, 0, 0);
-
- this.createHitDetectionCanvas_(renderOptions);
- } else {
- // an atlas manager is used, add the symbol to an atlas
- size = Math.round(size);
-
- var hasCustomHitDetectionImage = !this.fill_;
- var renderHitDetectionCallback;
- if (hasCustomHitDetectionImage) {
- // render the hit-detection image into a separate atlas image
- renderHitDetectionCallback =
- this.drawHitDetectionCanvas_.bind(this, renderOptions);
- }
-
- var id = this.getChecksum();
- var info = atlasManager.add(
- id, size, size, this.draw_.bind(this, renderOptions),
- renderHitDetectionCallback);
- goog.asserts.assert(info, 'arrow size is too large');
-
- this.canvas_ = info.image;
- this.origin_ = [info.offsetX, info.offsetY];
- imageSize = info.image.width;
-
- if (hasCustomHitDetectionImage) {
- this.hitDetectionCanvas_ = info.hitImage;
- this.hitDetectionImageSize_ =
- [info.hitImage.width, info.hitImage.height];
- } else {
- this.hitDetectionCanvas_ = this.canvas_;
- this.hitDetectionImageSize_ = [imageSize, imageSize];
- }
- }
-
- this.anchor_ = [size / 2, size / 2];
- this.size_ = [size, size];
- this.imageSize_ = [imageSize, imageSize];
-};
-
-
-/**
- * @private
- * @param {ol.ArrowRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The rendering context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.Arrow.prototype.draw_ = function(renderOptions, context, x, y) {
- var innerRadius = this.radius_ / Math.sin(Math.PI - this.backAngle_ / 2) *
- Math.sin(this.backAngle_ / 2 - this.frontAngle_);
-
- // reset transform
- context.setTransform(1, 0, 0, 1, 0, 0);
-
- // then move to (x, y)
- context.translate(x, y);
-
-
- context.beginPath();
-
- function lineTo(radius, angle) {
- context.lineTo(
- renderOptions.size / 2 + radius * Math.cos(angle + Math.PI / 2),
- renderOptions.size / 2 - radius * Math.sin(angle + Math.PI / 2));
- }
-
- lineTo(this.radius_, 0);
- lineTo(this.radius_, Math.PI - this.frontAngle_);
- lineTo(innerRadius, Math.PI);
- lineTo(this.radius_, this.frontAngle_ - Math.PI);
- lineTo(this.radius_, 0);
-
- if (this.fill_) {
- context.fillStyle = ol.colorlike.asColorLike(this.fill_.getColor());
- context.fill();
- }
- if (this.stroke_) {
- context.strokeStyle = renderOptions.strokeStyle;
- context.lineWidth = renderOptions.strokeWidth;
- if (renderOptions.lineDash) {
- context.setLineDash(renderOptions.lineDash);
- }
- context.lineCap = renderOptions.lineCap;
- context.lineJoin = renderOptions.lineJoin;
- context.miterLimit = renderOptions.miterLimit;
- context.stroke();
- }
- context.closePath();
-};
-
-
-/**
- * @private
- * @param {ol.ArrowRenderOptions} renderOptions Render options.
- */
-ol.style.Arrow.prototype.createHitDetectionCanvas_ = function(renderOptions) {
- this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
- if (this.fill_) {
- this.hitDetectionCanvas_ = this.canvas_;
- return;
- }
-
- // if no fill style is set, create an extra hit-detection image with a
- // default fill style
- var context = ol.dom.createCanvasContext2D(renderOptions.size, renderOptions.size);
- this.hitDetectionCanvas_ = context.canvas;
-
- this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);
-};
-
-
-/**
- * @private
- * @param {ol.ArrowRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.Arrow.prototype.drawHitDetectionCanvas_ = function(renderOptions, context, x, y) {
- var innerRadius = this.radius_ / Math.sin(Math.PI - this.backAngle_ / 2) *
- Math.sin(this.backAngle_ / 2 - this.frontAngle_);
-
- // reset transform
- context.setTransform(1, 0, 0, 1, 0, 0);
-
- // then move to (x, y)
- context.translate(x, y);
-
- context.beginPath();
-
- function lineTo(radius, angle) {
- context.lineTo(
- renderOptions.size / 2 + radius * Math.cos(angle + Math.PI / 2),
- renderOptions.size / 2 - radius * Math.sin(angle + Math.PI / 2));
- }
-
- lineTo(this.radius_, 0);
- lineTo(this.radius_, Math.PI - this.frontAngle_);
- lineTo(innerRadius / 2, Math.PI);
- lineTo(this.radius_, this.frontAngle_ - Math.PI);
- lineTo(this.radius_, 0);
-
- context.fillStyle = ol.render.canvas.defaultFillStyle;
- context.fill();
- if (this.stroke_) {
- context.strokeStyle = renderOptions.strokeStyle;
- context.lineWidth = renderOptions.strokeWidth;
- if (renderOptions.lineDash) {
- context.setLineDash(renderOptions.lineDash);
- }
- context.stroke();
- }
- context.closePath();
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.Arrow.prototype.getChecksum = function() {
- var strokeChecksum = this.stroke_ ?
- this.stroke_.getChecksum() : '-';
- var fillChecksum = this.fill_ ?
- this.fill_.getChecksum() : '-';
-
- var recalculate = !this.checksums_ ||
- (strokeChecksum != this.checksums_[1] ||
- fillChecksum != this.checksums_[2] ||
- this.radius_ != this.checksums_[3] ||
- this.frontAngle_ != this.checksums_[4] ||
- this.backAngle_ != this.checksums_[5]);
-
- if (recalculate) {
- var checksum = 'r' + strokeChecksum + fillChecksum +
- (this.radius_ !== undefined ? this.radius_.toString() : '-') +
- (this.frontAngle_ !== undefined ? this.frontAngle_.toString() : '-') +
- (this.backAngle_ !== undefined ? this.backAngle_.toString() : '-');
- this.checksums_ = [checksum, strokeChecksum, fillChecksum,
- this.radius_, this.frontAngle_, this.backAngle_];
- }
-
- return this.checksums_[0];
-};
diff --git a/web/beep.wav b/web/beep.wav
deleted file mode 100644
index c2364f114..000000000
--- a/web/beep.wav
+++ /dev/null
Binary files differ
diff --git a/web/debug.html b/web/debug.html
deleted file mode 100644
index 0e9576323..000000000
--- a/web/debug.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<title>Traccar</title>
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/resources/theme-neptune-all.css">
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol.css">
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
-<link rel="stylesheet" href="app.css">
-</head>
-<body>
-<div id="spinner"></div>
-<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div>
-<script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/ext-all-debug.js"></script>
-<script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/theme-neptune.js"></script>
-<script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol-debug.js"></script>
-<script src="arrowstyle.js"></script>
-<script type="text/javascript">
-Ext.Loader.setConfig({ disableCaching: false });
-</script>
-<script src="locale.js"></script>
-<script src="app.js"></script>
-</body>
-</html>
diff --git a/web/favicon.ico b/web/favicon.ico
deleted file mode 100644
index 1918dfffb..000000000
--- a/web/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/web/l10n/ar.json b/web/l10n/ar.json
deleted file mode 100644
index ac40da9ee..000000000
--- a/web/l10n/ar.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "جاري التحميل...",
- "sharedSave": "حفظ",
- "sharedCancel": "إلغاء",
- "sharedAdd": "إضافة",
- "sharedEdit": "تعديل",
- "sharedRemove": "حذف",
- "sharedRemoveConfirm": "حذف العنصر؟",
- "sharedKm": "كم",
- "sharedMi": "ميل",
- "sharedKn": "عقدة",
- "sharedKmh": "كم/ساعه",
- "sharedMph": "ميل/ساعة",
- "sharedHour": "ساعه",
- "sharedMinute": "دقيقة",
- "sharedSecond": "ثانية",
- "sharedName": "الاسم",
- "sharedDescription": "الوصف",
- "sharedSearch": "بحث",
- "sharedGeofence": "السياج الجغرافي",
- "sharedGeofences": "السياجات الجغرافية",
- "sharedNotifications": "التنبيهات",
- "sharedAttributes": "الخصائص",
- "sharedAttribute": "خاصية",
- "sharedArea": "منطقة",
- "sharedMute": "Mute",
- "errorTitle": "خطأ",
- "errorUnknown": "خطأ غير معروف",
- "errorConnection": "خطأ في الاتصال",
- "userEmail": "بريد إلكتروني",
- "userPassword": "كلمة المرور",
- "userAdmin": "مدير النظام",
- "userRemember": "Remember",
- "loginTitle": "تسجيل الدخول",
- "loginLanguage": "اللغة",
- "loginRegister": "تسجيل جديد",
- "loginLogin": "تسجيل الدخول",
- "loginFailed": "كلمة مرور او بريد خاطئ",
- "loginCreated": "تم تسجيل مستخدم جديد",
- "loginLogout": "خروج",
- "devicesAndState": "الأجهزة والحالة",
- "deviceDialog": "جهاز",
- "deviceTitle": "أجهزة",
- "deviceIdentifier": "المعرف",
- "deviceLastUpdate": "آخر تحديث",
- "deviceCommand": "أمر ",
- "deviceFollow": "متابعة",
- "groupDialog": "مجموعة",
- "groupParent": "مجموعة",
- "groupNoGroup": "لا توجد مجموعة",
- "settingsTitle": "إعدادات",
- "settingsUser": "حساب",
- "settingsGroups": "المجموعات",
- "settingsServer": "خادم",
- "settingsUsers": "المستخدمون",
- "settingsDistanceUnit": "مسافة",
- "settingsSpeedUnit": "سرعة",
- "settingsTwelveHourFormat": "صيغة 12-ساعة",
- "reportTitle": "تقارير",
- "reportDevice": "جهاز",
- "reportFrom": "من",
- "reportTo": "الي",
- "reportShow": "اظهار",
- "reportClear": "تفريغ الحقول",
- "positionFixTime": "وقت",
- "positionValid": "صالح",
- "positionLatitude": "خط العرض",
- "positionLongitude": "خط الطول",
- "positionAltitude": "ارتفاع عن سطح البحر",
- "positionSpeed": "السرعة",
- "positionCourse": "دورة",
- "positionAddress": "العنوان",
- "positionProtocol": "بروتوكول",
- "serverTitle": "اعدادت الخادم",
- "serverZoom": "تقريب",
- "serverRegistration": "تسجيل",
- "serverReadonly": "قراءة فقط",
- "mapTitle": "خريطة",
- "mapLayer": "طبقة الخريطة",
- "mapCustom": "خريطة محددة",
- "mapOsm": "خرائط اوبن ستريت",
- "mapBingKey": "مفتاح خرائط Bing",
- "mapBingRoad": " خرائط الطرق Bing",
- "mapBingAerial": "خرائط جوية Bing",
- "mapShapePolygon": "مضلع",
- "mapShapeCircle": "دائرة",
- "stateTitle": "حالة",
- "stateName": "عنصر",
- "stateValue": "قيمة",
- "commandTitle": "أمر",
- "commandSend": "ارسال",
- "commandType": "النوع",
- "commandSent": "تم ارسال الأمر",
- "commandPositionPeriodic": "تقارير دورية",
- "commandPositionStop": "ايقاف الارسال",
- "commandEngineStop": "ايقاف المحرك",
- "commandEngineResume": "تشغيل المحرك",
- "commandFrequency": "تردد",
- "commandUnit": "وحدة",
- "commandCustom": "أمر خاص",
- "commandPositionSingle": "تقرير مفرد",
- "commandAlarmArm": "بدء تشغيل المنبه",
- "commandAlarmDisarm": "تعطيل المنبه",
- "commandSetTimezone": "حدد التوقيت الزمني",
- "commandRequestPhoto": "اطلب صورة",
- "commandRebootDevice": "أعد تشغيل الجهاز",
- "commandSendSms": "إرسال رسالة قصيرة",
- "commandSosNumber": "ظبط رقم الطوارئ",
- "commandSilenceTime": "حدد توقيت الصامت",
- "commandSetPhonebook": "ضبط سجل الهاتف",
- "commandVoiceMessage": "رسالة صوتية",
- "commandOutputControl": "التحكم بالإخراج",
- "commandAlarmSpeed": "منبه تعدي السرعة",
- "commandDeviceIdentification": "تعريف الجهاز",
- "eventDeviceOnline": "الجهاز متصل",
- "eventDeviceOffline": "الجهاز غير متصل",
- "eventDeviceMoving": "الجهاز يتحرك",
- "eventDeviceStopped": "الجهاز متوقف",
- "eventDeviceOverspeed": "الجهاز متعدٍّ للسرعة",
- "eventCommandResult": "نتيجة الأمر",
- "eventGeofenceEnter": "الجهاز قد دخل السياج الجغرافي",
- "eventGeofenceExit": "الجهاز قد خرج من السياج الجغرافي",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "نوع الملاحظة",
- "notificationWeb": "أرسل عن طريق صفحة الويب",
- "notificationMail": "أرسل عن طريق البريد الإلكتروني"
-} \ No newline at end of file
diff --git a/web/l10n/bg.json b/web/l10n/bg.json
deleted file mode 100644
index 68d631ec8..000000000
--- a/web/l10n/bg.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Зареждане...",
- "sharedSave": "Запази",
- "sharedCancel": "Отказ",
- "sharedAdd": "Добави",
- "sharedEdit": "Редактирай",
- "sharedRemove": "Премахни",
- "sharedRemoveConfirm": "Премахване на Устройство?",
- "sharedKm": "км",
- "sharedMi": "мл",
- "sharedKn": "kn",
- "sharedKmh": "км/ч",
- "sharedMph": "мл/ч",
- "sharedHour": "Час",
- "sharedMinute": "Минута",
- "sharedSecond": "Секунда",
- "sharedName": "Име",
- "sharedDescription": "Описание",
- "sharedSearch": "Търси",
- "sharedGeofence": "Зона",
- "sharedGeofences": "Зони",
- "sharedNotifications": "Известия",
- "sharedAttributes": "Атрибути",
- "sharedAttribute": "Атрибут",
- "sharedArea": "Район",
- "sharedMute": "Изкл. звук",
- "errorTitle": "Грешка",
- "errorUnknown": "Непозната Грешка",
- "errorConnection": "Грешка във връзката",
- "userEmail": "Пощенска кутия",
- "userPassword": "Парола",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Вход",
- "loginLanguage": "Език",
- "loginRegister": "Регистрация",
- "loginLogin": "Вход",
- "loginFailed": "Грешен потребител или парола",
- "loginCreated": "Регистриран Нов Потребител",
- "loginLogout": "Изход",
- "devicesAndState": "Устройства и състояние",
- "deviceDialog": "Обекти",
- "deviceTitle": "Устройства",
- "deviceIdentifier": "Идентификатор",
- "deviceLastUpdate": "Последно обновяване",
- "deviceCommand": "Команда",
- "deviceFollow": "Следвай",
- "groupDialog": "Група",
- "groupParent": "Група",
- "groupNoGroup": "Без група",
- "settingsTitle": "Настройки",
- "settingsUser": "Профил",
- "settingsGroups": "Групи",
- "settingsServer": "Сървър",
- "settingsUsers": "Потребител",
- "settingsDistanceUnit": "Разстояние",
- "settingsSpeedUnit": "Скорост",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Доклад",
- "reportDevice": "Устройство",
- "reportFrom": "От",
- "reportTo": "До",
- "reportShow": "Покажи",
- "reportClear": "Изчисти",
- "positionFixTime": "Време",
- "positionValid": "Валидност",
- "positionLatitude": "Географска Ширина",
- "positionLongitude": "Географска Дължина",
- "positionAltitude": "Надморска височина",
- "positionSpeed": "Скорост",
- "positionCourse": "Посока",
- "positionAddress": "Адрес",
- "positionProtocol": "Протокол",
- "serverTitle": "Настройки на Сървъра",
- "serverZoom": "Приближение",
- "serverRegistration": "Регистрация",
- "serverReadonly": "Readonly",
- "mapTitle": "Карта",
- "mapLayer": "Слой",
- "mapCustom": "Потребителска Карта",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Многоъгълник",
- "mapShapeCircle": "Кръг",
- "stateTitle": "Състояние",
- "stateName": "Параметър",
- "stateValue": "Стойност",
- "commandTitle": "Команда",
- "commandSend": "Изпрати",
- "commandType": "Тип",
- "commandSent": "Съобщението е изпратено",
- "commandPositionPeriodic": "Периодичен Доклад",
- "commandPositionStop": "Спри Доклада",
- "commandEngineStop": "Спри Двигател",
- "commandEngineResume": "Стартирай Двигател",
- "commandFrequency": "Честота",
- "commandUnit": "Обект",
- "commandCustom": "Персонализирана Команда",
- "commandPositionSingle": "Единичен доклад",
- "commandAlarmArm": "Активирай Аларма",
- "commandAlarmDisarm": "Деактивирай Аларма",
- "commandSetTimezone": "Задайте Часова Зона",
- "commandRequestPhoto": "Изпрати Снимка",
- "commandRebootDevice": "Рестартирай Устройство",
- "commandSendSms": "Изпрати СМС",
- "commandSosNumber": "Задай SOS номер",
- "commandSilenceTime": "Задай Тих Час",
- "commandSetPhonebook": "Задай Тел. Указател",
- "commandVoiceMessage": "Гласово Съобщение",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Аларма за Превишена Скорост",
- "commandDeviceIdentification": "Идентификация на Устройство",
- "eventDeviceOnline": "Устройството е онлайн",
- "eventDeviceOffline": "Устройството е офлайн",
- "eventDeviceMoving": "Устройството е в движение",
- "eventDeviceStopped": "Устройството е спряло",
- "eventDeviceOverspeed": "Устройството превишава скоростта",
- "eventCommandResult": "Резултат от командата",
- "eventGeofenceEnter": "Устройството влезе в зоната",
- "eventGeofenceExit": "Устройството излезе от зоната",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Тип на известието",
- "notificationWeb": "Изпрати през Web",
- "notificationMail": "Изпрати през Mail"
-} \ No newline at end of file
diff --git a/web/l10n/cs.json b/web/l10n/cs.json
deleted file mode 100644
index e27f767be..000000000
--- a/web/l10n/cs.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Načítání...",
- "sharedSave": "Uložit",
- "sharedCancel": "Zrušit",
- "sharedAdd": "Přidat",
- "sharedEdit": "Změnit",
- "sharedRemove": "Odstranit",
- "sharedRemoveConfirm": "Odstranit položku?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Hodina",
- "sharedMinute": "Minuta",
- "sharedSecond": "Sekunda",
- "sharedName": "Jméno",
- "sharedDescription": "Popis",
- "sharedSearch": "Hledat",
- "sharedGeofence": "Geografická hranice",
- "sharedGeofences": "Geografické hranice",
- "sharedNotifications": "Upozornění",
- "sharedAttributes": "Atributy",
- "sharedAttribute": "Atribut",
- "sharedArea": "Oblast",
- "sharedMute": "Mute",
- "errorTitle": "Chyba",
- "errorUnknown": "Neznámá chyba",
- "errorConnection": "Chyba spojení",
- "userEmail": "Email",
- "userPassword": "Heslo",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Přihlášení",
- "loginLanguage": "Jazyk",
- "loginRegister": "Registrace",
- "loginLogin": "Přihlášení",
- "loginFailed": "Nesprávný email nebo heslo",
- "loginCreated": "Nový uživatel byl zaregistrován",
- "loginLogout": "Odhlášení",
- "devicesAndState": "Zařízení a stav",
- "deviceDialog": "Zařízení",
- "deviceTitle": "Zařízení",
- "deviceIdentifier": "Identifikace",
- "deviceLastUpdate": "Poslední změna",
- "deviceCommand": "Příkaz",
- "deviceFollow": "Sledovat",
- "groupDialog": "Skupina",
- "groupParent": "Skupina",
- "groupNoGroup": "Žádná skupina",
- "settingsTitle": "Nastavení",
- "settingsUser": "Účet",
- "settingsGroups": "Skupiny",
- "settingsServer": "Server",
- "settingsUsers": "Uživatelé",
- "settingsDistanceUnit": "Vzdálenost",
- "settingsSpeedUnit": "Rychlost",
- "settingsTwelveHourFormat": "12-hodinový formát",
- "reportTitle": "Zpráva",
- "reportDevice": "Zařízení",
- "reportFrom": "Od",
- "reportTo": "Komu",
- "reportShow": "Zobrazit",
- "reportClear": "Vyčistit",
- "positionFixTime": "Čas",
- "positionValid": "Správný",
- "positionLatitude": "Šířka",
- "positionLongitude": "Délka",
- "positionAltitude": "Výška",
- "positionSpeed": "Rychlost",
- "positionCourse": "Směr",
- "positionAddress": "Adresa",
- "positionProtocol": "Protokol",
- "serverTitle": "Nastavení serveru",
- "serverZoom": "Přiblížení",
- "serverRegistration": "Registrace",
- "serverReadonly": "Pouze pro čtení",
- "mapTitle": "Mapa",
- "mapLayer": "Vrstva mapy",
- "mapCustom": "Upravená mapa",
- "mapOsm": "Open Street mapa",
- "mapBingKey": "Bing Maps klíč",
- "mapBingRoad": "Bing Maps cesta",
- "mapBingAerial": "Bing Maps anténa",
- "mapShapePolygon": "Mnohoúhelník",
- "mapShapeCircle": "Kruh",
- "stateTitle": "Stav",
- "stateName": "Atribut",
- "stateValue": "Hodnota",
- "commandTitle": "Příkaz",
- "commandSend": "Odeslat",
- "commandType": "Napsat",
- "commandSent": "Příkaz byl odeslán",
- "commandPositionPeriodic": "Pravidelný report",
- "commandPositionStop": "Zastavit report",
- "commandEngineStop": "Zastavit motor",
- "commandEngineResume": "Nastartovat motor",
- "commandFrequency": "Frekvence",
- "commandUnit": "Jednotka",
- "commandCustom": "Volitelný příkaz",
- "commandPositionSingle": "Jednotné hlášení",
- "commandAlarmArm": "Aktivovat alarm",
- "commandAlarmDisarm": "Deaktivovat alarm",
- "commandSetTimezone": "Nastavit časovou zónu",
- "commandRequestPhoto": "Vyžádat fotku",
- "commandRebootDevice": "Restartovat zařízení",
- "commandSendSms": "Odeslat SMS",
- "commandSosNumber": "Nastavit SOS číslo",
- "commandSilenceTime": "Nastavit čas tichého módu",
- "commandSetPhonebook": "Nastavit telefonní seznam",
- "commandVoiceMessage": "Hlasová zpráva",
- "commandOutputControl": "Ovládání výstupu",
- "commandAlarmSpeed": "Překročení rychlosti alarmu",
- "commandDeviceIdentification": "Identifikace zařízení",
- "eventDeviceOnline": "Zařízení je online",
- "eventDeviceOffline": "Zařízení je offline",
- "eventDeviceMoving": "Zařízení s pohybuje",
- "eventDeviceStopped": "Zařízení se zastavilo",
- "eventDeviceOverspeed": "Zařízení překračuje rychlost",
- "eventCommandResult": "Výsledek příkazu",
- "eventGeofenceEnter": "Zařízení vstoupilo do geografické hranice",
- "eventGeofenceExit": "Zařízení opustilo geografickou hranici",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Typ oznámení",
- "notificationWeb": "Odeslat přes web",
- "notificationMail": "Odeslat přes mail"
-} \ No newline at end of file
diff --git a/web/l10n/da.json b/web/l10n/da.json
deleted file mode 100644
index ec8f02816..000000000
--- a/web/l10n/da.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Loading... ",
- "sharedSave": "Gem",
- "sharedCancel": "Fortryd",
- "sharedAdd": "Tilføj",
- "sharedEdit": "Rediger",
- "sharedRemove": "Fjern",
- "sharedRemoveConfirm": "Fjern enhed?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "knob",
- "sharedKmh": "km/t",
- "sharedMph": "mph",
- "sharedHour": "Time",
- "sharedMinute": "Minut",
- "sharedSecond": "Sekund",
- "sharedName": "Navn",
- "sharedDescription": "Beskrivelse",
- "sharedSearch": "Søg",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifikationer",
- "sharedAttributes": "Egenskaber",
- "sharedAttribute": "Egenskab",
- "sharedArea": "Område",
- "sharedMute": "Mute",
- "errorTitle": "Fejl",
- "errorUnknown": "Ukendt Fejl",
- "errorConnection": "Tilslutning fejl",
- "userEmail": "Email",
- "userPassword": "Kodeord",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Log på",
- "loginLanguage": "Sprog",
- "loginRegister": "Registrer",
- "loginLogin": "Log på",
- "loginFailed": "Fejl i email adresse eller kodeord",
- "loginCreated": "Ny bruger er registreret",
- "loginLogout": "Log af",
- "devicesAndState": "Enheder og status",
- "deviceDialog": "Enhed",
- "deviceTitle": "Enheder",
- "deviceIdentifier": "Imei nr",
- "deviceLastUpdate": "Seneste opdatering",
- "deviceCommand": "Kommando",
- "deviceFollow": "Følg",
- "groupDialog": "Gruppe",
- "groupParent": "Gruppe",
- "groupNoGroup": "Ingen gruppe",
- "settingsTitle": "Indstillinger",
- "settingsUser": "Konto",
- "settingsGroups": "Grupper",
- "settingsServer": "Server",
- "settingsUsers": "Brugere",
- "settingsDistanceUnit": "Distance",
- "settingsSpeedUnit": "Hastighed",
- "settingsTwelveHourFormat": "12 timers format",
- "reportTitle": "Rapporter",
- "reportDevice": "Enhed",
- "reportFrom": "Fra",
- "reportTo": "Til",
- "reportShow": "Vis",
- "reportClear": "Ryd",
- "positionFixTime": "Tid",
- "positionValid": "Valid",
- "positionLatitude": "Breddegrad",
- "positionLongitude": "Længdegrad",
- "positionAltitude": "Højde",
- "positionSpeed": "Hastighed",
- "positionCourse": "Kurs",
- "positionAddress": "Adresse",
- "positionProtocol": "Protokol",
- "serverTitle": "Server indstillinger",
- "serverZoom": "Zoom",
- "serverRegistration": "Registrering",
- "serverReadonly": "Læs",
- "mapTitle": "Kort",
- "mapLayer": "Kort opsætning",
- "mapCustom": "Brugerdefineret Kort",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Cirkel",
- "stateTitle": "Status",
- "stateName": "Parameter",
- "stateValue": "Værdi",
- "commandTitle": "Kommando",
- "commandSend": "Send",
- "commandType": "Type",
- "commandSent": "Kommando er blevet sendt",
- "commandPositionPeriodic": "Periodisk Rapportering",
- "commandPositionStop": "Stop Rapportering",
- "commandEngineStop": "Stop motor",
- "commandEngineResume": "Genstart motor",
- "commandFrequency": "Frekvens",
- "commandUnit": "Enhed",
- "commandCustom": "Skræddersyet kommando",
- "commandPositionSingle": "Enkel rapport",
- "commandAlarmArm": "Armer alarm",
- "commandAlarmDisarm": "Slå alarm fra",
- "commandSetTimezone": "Sæt tidszone",
- "commandRequestPhoto": "Tag billede",
- "commandRebootDevice": "Genstart enhed",
- "commandSendSms": "send SMS",
- "commandSosNumber": "Angiv SOS nummer",
- "commandSilenceTime": "Angiv lydløs tid",
- "commandSetPhonebook": "Angiv telefonbog",
- "commandVoiceMessage": "Tale meddelelse",
- "commandOutputControl": "Output kontrol",
- "commandAlarmSpeed": "Hastigheds alarm",
- "commandDeviceIdentification": "Enheds id",
- "eventDeviceOnline": "Enhed online",
- "eventDeviceOffline": "Enhed offline",
- "eventDeviceMoving": "Enhed i bevægelse",
- "eventDeviceStopped": "Enhed i stilstand",
- "eventDeviceOverspeed": "Enhed overskrider hastighed",
- "eventCommandResult": "Resultat af kommando",
- "eventGeofenceEnter": "Enhed kom indenfor geofence",
- "eventGeofenceExit": "Enhed kom udenfor geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type af notifikation",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via mail"
-} \ No newline at end of file
diff --git a/web/l10n/de.json b/web/l10n/de.json
deleted file mode 100644
index 61a4567b1..000000000
--- a/web/l10n/de.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Lade...",
- "sharedSave": "Speichern",
- "sharedCancel": "Abbrechen",
- "sharedAdd": "Hinzufügen",
- "sharedEdit": "Bearbeiten",
- "sharedRemove": "Entfernen",
- "sharedRemoveConfirm": "Objekt entfernen?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Stunde",
- "sharedMinute": "Minute",
- "sharedSecond": "Sekunde",
- "sharedName": "Name",
- "sharedDescription": "Beschreibung",
- "sharedSearch": "Suchen",
- "sharedGeofence": "Geo-Zaun",
- "sharedGeofences": "Geo-Zäune",
- "sharedNotifications": "Benachrichtigungen",
- "sharedAttributes": "Eigenschaften",
- "sharedAttribute": "Eigenschaft",
- "sharedArea": "Gebiet",
- "sharedMute": "Stummschalten",
- "errorTitle": "Fehler",
- "errorUnknown": "Unbekannter Fehler",
- "errorConnection": "Verbindungsfehler",
- "userEmail": "Email",
- "userPassword": "Passwort",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Anmeldung",
- "loginLanguage": "Sprache",
- "loginRegister": "Registrieren",
- "loginLogin": "Anmelden",
- "loginFailed": "Falsche Emailadresse oder Passwort",
- "loginCreated": "Neuer Benutzer wurde registriert",
- "loginLogout": "Abmelden",
- "devicesAndState": "Geräte und Status",
- "deviceDialog": "Gerät",
- "deviceTitle": "Geräte",
- "deviceIdentifier": "Kennung",
- "deviceLastUpdate": "Letzte Aktualisierung",
- "deviceCommand": "Befehl",
- "deviceFollow": "Folgen",
- "groupDialog": "Gruppe",
- "groupParent": "Gruppe",
- "groupNoGroup": "Keine Gruppe",
- "settingsTitle": "Einstellungen",
- "settingsUser": "Benutzerkonto",
- "settingsGroups": "Gruppen",
- "settingsServer": "Server",
- "settingsUsers": "Benutzer",
- "settingsDistanceUnit": "Entfernung",
- "settingsSpeedUnit": "Geschwindigkeit",
- "settingsTwelveHourFormat": "12 Stunden Format",
- "reportTitle": "Berichte",
- "reportDevice": "Gerät",
- "reportFrom": "Von",
- "reportTo": "Bis",
- "reportShow": "Anzeigen",
- "reportClear": "Leeren",
- "positionFixTime": "Zeit",
- "positionValid": "Gültig",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "Geschwindigkeit",
- "positionCourse": "Richtung",
- "positionAddress": "Adresse",
- "positionProtocol": "Protokoll",
- "serverTitle": "Server Einstellungen",
- "serverZoom": "Zoomen",
- "serverRegistration": "Registrierung zulassen",
- "serverReadonly": "Nur Lesen",
- "mapTitle": "Karte",
- "mapLayer": "Karten Layer",
- "mapCustom": "Benutzerspezifische Karte",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Strassenkarte",
- "mapBingAerial": "Bing Luftbilder",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Kreis",
- "stateTitle": "Status",
- "stateName": "Parameter",
- "stateValue": "Wert",
- "commandTitle": "Befehl",
- "commandSend": "Senden",
- "commandType": "Typ",
- "commandSent": "Befehl wurde gesendet",
- "commandPositionPeriodic": "Periodische Berichte",
- "commandPositionStop": "Bericht stoppen",
- "commandEngineStop": "Motor Stop",
- "commandEngineResume": "Motor Start",
- "commandFrequency": "Frequenz",
- "commandUnit": "Einheit",
- "commandCustom": "Benutzerdefinierter Befehl",
- "commandPositionSingle": "Einzelner Bericht",
- "commandAlarmArm": "Scharf schalten",
- "commandAlarmDisarm": "Unscharf schalten",
- "commandSetTimezone": "Zeitzone festlegen",
- "commandRequestPhoto": "Foto anfordern",
- "commandRebootDevice": "Gerät neustarten",
- "commandSendSms": "SMS senden",
- "commandSosNumber": "SOS-Nummer festlegen",
- "commandSilenceTime": "Ruhezeit festlegen",
- "commandSetPhonebook": "Telefonbuch festlegen",
- "commandVoiceMessage": "Sprachnachricht",
- "commandOutputControl": "Berichtsteuerung",
- "commandAlarmSpeed": "Geschwindigkeitsalarm",
- "commandDeviceIdentification": "Gerätekennung",
- "eventDeviceOnline": "Gerät ist online",
- "eventDeviceOffline": "Gerät ist offline",
- "eventDeviceMoving": "Gerät ist in Bewegung",
- "eventDeviceStopped": "Gerät hat gestoppt",
- "eventDeviceOverspeed": "Gerät überschreitet Tempolimit",
- "eventCommandResult": "Ergrbnis des Befehls",
- "eventGeofenceEnter": "Gerät hat Geo-Zaun betreten",
- "eventGeofenceExit": "Gerät hat Geo-Zaun verlassen",
- "eventAlarm": "Alarme",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Erschütterungsalarm",
- "alarmMovement": "Bewegungsalarm",
- "alarmOverspeed": "Geschwindigkeitsalarm",
- "alarmFallDown": "Sturzalarm",
- "alarmLowBattery": "Batteriealarm",
- "alarmMotion": "Bewegungsalarm",
- "alarmFault": "Fehleralarm",
- "notificationType": "Art der Benachrichtigung ",
- "notificationWeb": "Per Web senden",
- "notificationMail": "Per E-Mail senden"
-} \ No newline at end of file
diff --git a/web/l10n/el.json b/web/l10n/el.json
deleted file mode 100644
index cbadf67ef..000000000
--- a/web/l10n/el.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Φόρτωση...",
- "sharedSave": "Αποθήκευση",
- "sharedCancel": "Άκυρον",
- "sharedAdd": "Προσθήκη",
- "sharedEdit": "Επεξεργασία",
- "sharedRemove": "Διαγραφή",
- "sharedRemoveConfirm": "Διαγραφη στοιχείου;",
- "sharedKm": "χλμ",
- "sharedMi": "μίλια",
- "sharedKn": "κόμβοι",
- "sharedKmh": "χλμ/ώρα",
- "sharedMph": "μίλια/ώρα",
- "sharedHour": "Ώρα",
- "sharedMinute": "Λεπτά",
- "sharedSecond": "Δευτερόλεπτα",
- "sharedName": "Όνομα",
- "sharedDescription": "Περιγραφή",
- "sharedSearch": "Αναζήτηση",
- "sharedGeofence": "Γεωφράχτης",
- "sharedGeofences": "Γεωφράχτες",
- "sharedNotifications": "Ειδοποιήσεις",
- "sharedAttributes": "Παράμετροι",
- "sharedAttribute": "Παράμετρος",
- "sharedArea": "Περιοχή",
- "sharedMute": "Mute",
- "errorTitle": "Σφάλμα",
- "errorUnknown": "Άγνωστο σφάλμα",
- "errorConnection": "Σφάλμα σύνδεσης",
- "userEmail": "Ηλ. διεύθυνση",
- "userPassword": "Συνθηματικό",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Σύνδεση",
- "loginLanguage": "Γλώσσα",
- "loginRegister": "Εγγραφή",
- "loginLogin": "Σύνδεση",
- "loginFailed": "Εσφαλμένη διεύθυνση ή εσφαλμένο συνθηματικό",
- "loginCreated": "Ο νέος χρήστης καταχωρήθηκε.",
- "loginLogout": "Αποσύνδεση",
- "devicesAndState": "Κατάσταση συσκευών",
- "deviceDialog": "Συσκευή",
- "deviceTitle": "Συσκευές",
- "deviceIdentifier": "Αναγνωριστικό",
- "deviceLastUpdate": "Τελευταία ενημέρωση",
- "deviceCommand": "Εντολή",
- "deviceFollow": "Ακολουθώ",
- "groupDialog": "Ομάδα",
- "groupParent": "Ομάδα",
- "groupNoGroup": "Χωρίς Ομάδα",
- "settingsTitle": "Ρυθμίσεις",
- "settingsUser": "Λογαριασμός",
- "settingsGroups": "Ομάδες",
- "settingsServer": "Εξυπηρετητής",
- "settingsUsers": "Χρήστες",
- "settingsDistanceUnit": "Απόσταση",
- "settingsSpeedUnit": "Ταχύτητα",
- "settingsTwelveHourFormat": "12ώρη μορφή",
- "reportTitle": "Αναφορές",
- "reportDevice": "Συσκευή",
- "reportFrom": "Από",
- "reportTo": "Έως",
- "reportShow": "Προβολή",
- "reportClear": "Καθαρισμός",
- "positionFixTime": "Χρόνος",
- "positionValid": "Έγκυρο",
- "positionLatitude": "Γ. πλάτος",
- "positionLongitude": "Γ. μήκος",
- "positionAltitude": "Υψόμετρο",
- "positionSpeed": "Ταχύτητα",
- "positionCourse": "Πορεία",
- "positionAddress": "Διεύθυνση",
- "positionProtocol": "Πρωτόκολλο",
- "serverTitle": "Ρυθμίσεις εξυπηρετητή",
- "serverZoom": "Εστίαση",
- "serverRegistration": "Εγγραφή",
- "serverReadonly": "Μόνο για ανάγνωση",
- "mapTitle": "Χάρτης",
- "mapLayer": "Επιλογή χάρτη",
- "mapCustom": "Προσαρμοσμένος χάρτης",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Κλειδί Bing Maps",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Πολύγωνο",
- "mapShapeCircle": "Κύκλος",
- "stateTitle": "Κατάσταση",
- "stateName": "Παράμετρος",
- "stateValue": "Τιμή",
- "commandTitle": "Εντολή",
- "commandSend": "Αποστολή",
- "commandType": "Τύπος",
- "commandSent": "Η εντολή έχει σταλεί.",
- "commandPositionPeriodic": "Περιοδικές αναφορές",
- "commandPositionStop": "Λήξη αναφορών",
- "commandEngineStop": "Κλείσιμο",
- "commandEngineResume": "Επανεκκίνηση",
- "commandFrequency": "Συχνότητα",
- "commandUnit": "Μονάδα",
- "commandCustom": "Προσαρμοσμένη εντολή",
- "commandPositionSingle": "Ενιαία αναφορά",
- "commandAlarmArm": "Ενεργοποίηση συναγερμού",
- "commandAlarmDisarm": "Απενεργοποίηση συναγερμού",
- "commandSetTimezone": "Καθορισμός ζώνης ώρας",
- "commandRequestPhoto": "Αίτημα για φωτογραφία",
- "commandRebootDevice": "Επανεκκίνηση συσκευής",
- "commandSendSms": "Αποστολή γραπτού μηνύματος (SMS)",
- "commandSosNumber": "Καθορισμός αριθμού SOS",
- "commandSilenceTime": "Καθορισμός χρόνου σιωπής",
- "commandSetPhonebook": "Καθορισμός τηλεφωνικού καταλόγου",
- "commandVoiceMessage": "Φωνητικό μήνυμα",
- "commandOutputControl": "Έλεγχος αποτελεσμάτων",
- "commandAlarmSpeed": "Υπέρβαση ορίου ταχύτητας",
- "commandDeviceIdentification": "Αναγνωριστικό συσκευής",
- "eventDeviceOnline": "Η συσκευή είναι συνδεδεμένη",
- "eventDeviceOffline": "Η συσκευή είναι αποσυνδεδεμένη",
- "eventDeviceMoving": "Η συσκευή βρίσκεται σε κίνηση",
- "eventDeviceStopped": "Η συσκευή έχει σταματήσει",
- "eventDeviceOverspeed": "Η συσκευή υπερέβει την ταχύτητα",
- "eventCommandResult": "Αποτέλεσμα εντολής",
- "eventGeofenceEnter": "Η συσσκευή εισήλθε του γεωφράχτη",
- "eventGeofenceExit": "Η συσκευή εξήλθε του γεωφράχτη",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Τύπος ειδοποίησης",
- "notificationWeb": "Αποστολή μέσω διαδικτύου",
- "notificationMail": "Αποστολή μέσω ηλ. ταχυδρομείου"
-} \ No newline at end of file
diff --git a/web/l10n/en.json b/web/l10n/en.json
deleted file mode 100644
index 563a37b18..000000000
--- a/web/l10n/en.json
+++ /dev/null
@@ -1,163 +0,0 @@
-{
- "sharedLoading": "Loading...",
- "sharedSave": "Save",
- "sharedCancel": "Cancel",
- "sharedAdd": "Add",
- "sharedEdit": "Edit",
- "sharedRemove": "Remove",
- "sharedRemoveConfirm": "Remove item?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Hour",
- "sharedMinute": "Minute",
- "sharedSecond": "Second",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "sharedType": "Type",
- "sharedDistance": "Distance",
- "sharedHourAbbreviation": "h",
- "sharedMinuteAbbreviation": "m",
- "errorTitle": "Error",
- "errorUnknown": "Unknown error",
- "errorConnection": "Connection error",
- "userEmail": "Email",
- "userPassword": "Password",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Login",
- "loginLanguage": "Language",
- "loginRegister": "Register",
- "loginLogin": "Login",
- "loginFailed": "Incorrect email address or password",
- "loginCreated": "New user has been registered",
- "loginLogout": "Logout",
- "devicesAndState": "Devices and State",
- "deviceDialog": "Device",
- "deviceTitle": "Devices",
- "deviceIdentifier": "Identifier",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Command",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Settings",
- "settingsUser": "Account",
- "settingsGroups": "Groups",
- "settingsServer": "Server",
- "settingsUsers": "Users",
- "settingsSpeedUnit": "Speed",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Reports",
- "reportDevice": "Device",
- "reportGroup": "Group",
- "reportFrom": "From",
- "reportTo": "To",
- "reportShow": "Show",
- "reportClear": "Clear",
- "positionFixTime": "Time",
- "positionValid": "Valid",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "Speed",
- "positionCourse": "Course",
- "positionAddress": "Address",
- "positionProtocol": "Protocol",
- "serverTitle": "Server Settings",
- "serverZoom": "Zoom",
- "serverRegistration": "Registration",
- "serverReadonly": "Readonly",
- "mapTitle": "Map",
- "mapLayer": "Map Layer",
- "mapCustom": "Custom Map",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "State",
- "stateName": "Attribute",
- "stateValue": "Value",
- "commandTitle": "Command",
- "commandSend": "Send",
- "commandSent": "Command has been sent",
- "commandPositionPeriodic": "Periodic Reporting",
- "commandPositionStop": "Stop Reporting",
- "commandEngineStop": "Engine Stop",
- "commandEngineResume": "Engine Resume",
- "commandFrequency": "Frequency",
- "commandUnit": "Unit",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSendUssd": "Send USSD",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "commandIndex": "Index",
- "commandData": "Data",
- "commandPhone": "Phone Number",
- "commandMessage": "Message",
- "eventAll": "All Events",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "eventIgnitionOn": "Ignition is ON",
- "eventIgnitionOff": "Ignition is OFF",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail",
- "reportRoute": "Route",
- "reportEvents": "Events",
- "reportTrips": "Trips",
- "reportSummary": "Summary",
- "reportConfigure": "Configure",
- "reportEventTypes": "Event Types",
- "reportCsv": "CSV",
- "reportDeviceName": "Device Name",
- "reportAverageSpeed": "Average Speed",
- "reportMaximumSpeed": "Maximum Speed",
- "reportEngineHours": "Engine Hours",
- "reportDuration": "Duration",
- "reportStartTime": "Start Time",
- "reportStartAddress": "Start Address",
- "reportEndTime": "End Time",
- "reportEndAddress": "End Address",
- "reportSpentFuel": "Spent Fuel"
-} \ No newline at end of file
diff --git a/web/l10n/es.json b/web/l10n/es.json
deleted file mode 100644
index f8ae21bfc..000000000
--- a/web/l10n/es.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Cargando...",
- "sharedSave": "Guardar",
- "sharedCancel": "Cancelar",
- "sharedAdd": "Agregar",
- "sharedEdit": "Editar",
- "sharedRemove": "Borrar",
- "sharedRemoveConfirm": "Borrar Elemento?",
- "sharedKm": "KM",
- "sharedMi": "MI",
- "sharedKn": "Nudo",
- "sharedKmh": "KM/H",
- "sharedMph": "MPH",
- "sharedHour": "Hora",
- "sharedMinute": "Minuto",
- "sharedSecond": "Segundo",
- "sharedName": "Nombre",
- "sharedDescription": "Descripción",
- "sharedSearch": "Buscar",
- "sharedGeofence": "Geocerca",
- "sharedGeofences": "Geocercas",
- "sharedNotifications": "Notificaciones",
- "sharedAttributes": "Atributos",
- "sharedAttribute": "Atributo",
- "sharedArea": "Área",
- "sharedMute": "Silenciar",
- "errorTitle": "Error",
- "errorUnknown": "Error Desconocido",
- "errorConnection": "Error de Conexión",
- "userEmail": "Email",
- "userPassword": "Contraseña",
- "userAdmin": "Administrador",
- "userRemember": "Remember",
- "loginTitle": "Ingresar",
- "loginLanguage": "Idioma",
- "loginRegister": "Registrar",
- "loginLogin": "Ingresar",
- "loginFailed": "Dirección de Correo o Contraseña Incorrecta",
- "loginCreated": "Nuevo Usuario ha sido registrado",
- "loginLogout": "Salir",
- "devicesAndState": "Dispositivos y Estado",
- "deviceDialog": "Dispositivo",
- "deviceTitle": "Dispositivos",
- "deviceIdentifier": "Identificador",
- "deviceLastUpdate": "Última Actualización",
- "deviceCommand": "Comando",
- "deviceFollow": "Seguir",
- "groupDialog": "Grupo",
- "groupParent": "Grupo",
- "groupNoGroup": "Sin grupo",
- "settingsTitle": "Preferencias",
- "settingsUser": "Cuenta",
- "settingsGroups": "Grupos",
- "settingsServer": "Servidor",
- "settingsUsers": "Usuarios",
- "settingsDistanceUnit": "Distancia",
- "settingsSpeedUnit": "Velocidad",
- "settingsTwelveHourFormat": "Formato de 12 Hrs",
- "reportTitle": "Reportes",
- "reportDevice": "Dispositivos",
- "reportFrom": "Desde",
- "reportTo": "Hasta",
- "reportShow": "Mostrar",
- "reportClear": "Limpiar",
- "positionFixTime": "Hora",
- "positionValid": "Válida",
- "positionLatitude": "Latitud",
- "positionLongitude": "Longitud",
- "positionAltitude": "Altitud",
- "positionSpeed": "Velocidad",
- "positionCourse": "Curso",
- "positionAddress": "Dirección",
- "positionProtocol": "Protocolo",
- "serverTitle": "Preferencias Servidor",
- "serverZoom": "Zoom",
- "serverRegistration": "Registrar",
- "serverReadonly": "Sólo Lectura",
- "mapTitle": "Mapa",
- "mapLayer": "Capa de Mapa",
- "mapCustom": "Mapa Personalizado",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps - Carretera",
- "mapBingAerial": "Bing Maps - Aéreo",
- "mapShapePolygon": "Polígono",
- "mapShapeCircle": "Círculo",
- "stateTitle": "Estado",
- "stateName": "Parámetro",
- "stateValue": "Valor",
- "commandTitle": "Comando",
- "commandSend": "Enviar",
- "commandType": "Tipo",
- "commandSent": "El Comando ha sido enviado",
- "commandPositionPeriodic": "Frecuencia de Posiciones",
- "commandPositionStop": "Detener Reporte de Posiciones",
- "commandEngineStop": "Apagar motor",
- "commandEngineResume": "Desbloquear Encendido de Motor",
- "commandFrequency": "Frequencia",
- "commandUnit": "Unidad",
- "commandCustom": "Comando personalizado",
- "commandPositionSingle": "Un report",
- "commandAlarmArm": "Armar Alarma",
- "commandAlarmDisarm": "Desarmar Alarma",
- "commandSetTimezone": "Establecer zona horaria",
- "commandRequestPhoto": "Solicitar Foto",
- "commandRebootDevice": "Reiniciar dispositivo",
- "commandSendSms": "Enviar SMS",
- "commandSosNumber": "Establecer el número SOS",
- "commandSilenceTime": "Setear horario de silencio",
- "commandSetPhonebook": "Establecer contacto",
- "commandVoiceMessage": "Mensaje de voz",
- "commandOutputControl": "Control de Salidas",
- "commandAlarmSpeed": "Alerta de Velocidad",
- "commandDeviceIdentification": "Identificación de Dispositivo",
- "eventDeviceOnline": "El dispositivo está en linea",
- "eventDeviceOffline": "El dispositivo está fuera de linea",
- "eventDeviceMoving": "El dispositivo se está moviendo",
- "eventDeviceStopped": "El dispositivo está parado",
- "eventDeviceOverspeed": "El dispositivo excedió el limite de velocidad",
- "eventCommandResult": "Resultado de comando",
- "eventGeofenceEnter": "El dispositivo ha ingresado a la geocerca",
- "eventGeofenceExit": "El dispositivo ha salido de la geocerca",
- "eventAlarm": "Alarmas",
- "alarm": "Alarma",
- "alarmSos": "Alarma de SOS",
- "alarmVibration": "Alarma de vibración",
- "alarmMovement": "Alarma de movimiento",
- "alarmOverspeed": "Alarma de exceso de velocidad",
- "alarmFallDown": "Alarma de caida",
- "alarmLowBattery": "Alarma de bateria baja",
- "alarmMotion": "Alarma de movimiento",
- "alarmFault": "Alarma de fallo",
- "notificationType": "Tipo de Notificación",
- "notificationWeb": "Envíar vía Web",
- "notificationMail": "Envíar vía Email"
-} \ No newline at end of file
diff --git a/web/l10n/fa.json b/web/l10n/fa.json
deleted file mode 100644
index 5bfec4bb1..000000000
--- a/web/l10n/fa.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "در حال بارگزارى ...",
- "sharedSave": "ذخيره",
- "sharedCancel": "انصراف",
- "sharedAdd": "اضافه كردن",
- "sharedEdit": "ویرایش",
- "sharedRemove": "پاک کردن",
- "sharedRemoveConfirm": "پاک کردن آیتم",
- "sharedKm": "کیلومتر",
- "sharedMi": "مایل",
- "sharedKn": "kn",
- "sharedKmh": "کیلومتر بر ساعت",
- "sharedMph": "مایل بر ساعت",
- "sharedHour": "ساعت",
- "sharedMinute": "دقيقه",
- "sharedSecond": "ثانيه",
- "sharedName": "نام",
- "sharedDescription": "توضیحات",
- "sharedSearch": "جستجو",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "خطا",
- "errorUnknown": "خطا ناشناخته",
- "errorConnection": "خطا در اتصال",
- "userEmail": "نام كاربرى ( ايميل )",
- "userPassword": "گذرواژه",
- "userAdmin": "مدیر",
- "userRemember": "Remember",
- "loginTitle": "ورود",
- "loginLanguage": "انتخاب زبان",
- "loginRegister": "ثبت نام",
- "loginLogin": "ورود",
- "loginFailed": "نام كاربرى ( ايميل ) يا گذرواژه اشتباه است",
- "loginCreated": "ثبت نام با موفقيت انجام شد",
- "loginLogout": "خروج",
- "devicesAndState": "دستگاه ها و وضعیت",
- "deviceDialog": "دستگاه",
- "deviceTitle": "دستگاه ها",
- "deviceIdentifier": "سريال دستگاه",
- "deviceLastUpdate": "آخرين بروزرسانى",
- "deviceCommand": "فرمان",
- "deviceFollow": "تعقیب",
- "groupDialog": "گروه",
- "groupParent": "گروه",
- "groupNoGroup": "بدون گروه",
- "settingsTitle": "تنظيمات",
- "settingsUser": "حساب كاربرى",
- "settingsGroups": "گروه ها",
- "settingsServer": "سرور",
- "settingsUsers": "کاربر",
- "settingsDistanceUnit": "فاصله",
- "settingsSpeedUnit": "سرعت",
- "settingsTwelveHourFormat": "فرمت 12 ساعتی",
- "reportTitle": "گزارشات ",
- "reportDevice": "دستگاه",
- "reportFrom": "از",
- "reportTo": "تا",
- "reportShow": "نمایش",
- "reportClear": "خالی کردن",
- "positionFixTime": "زمان",
- "positionValid": "معتبر",
- "positionLatitude": "عرض جغرافيايى",
- "positionLongitude": "طول جغرافيايى",
- "positionAltitude": "ارتفاع",
- "positionSpeed": "سرعت",
- "positionCourse": "دوره",
- "positionAddress": "آدرس",
- "positionProtocol": "پروتوکل",
- "serverTitle": "تنظیمات سرور",
- "serverZoom": "بزرگنمایی",
- "serverRegistration": "ثبت نام",
- "serverReadonly": "فقط خواندنی",
- "mapTitle": "نقشه",
- "mapLayer": "لایه های نقشه",
- "mapCustom": "نقشه سفارشی",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "وضعیت",
- "stateName": "ویژگی",
- "stateValue": "مقدار",
- "commandTitle": "فرمان",
- "commandSend": "ارسال",
- "commandType": "نوع",
- "commandSent": "دستور ارسال گردید",
- "commandPositionPeriodic": "Periodic Reporting",
- "commandPositionStop": "Stop Reporting",
- "commandEngineStop": "Engine Stop",
- "commandEngineResume": "Engine Resume",
- "commandFrequency": "فرکانس",
- "commandUnit": "واحد",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "ارسال پیام کوتاه",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/fi.json b/web/l10n/fi.json
deleted file mode 100644
index 9309ab1a1..000000000
--- a/web/l10n/fi.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Ladataan...",
- "sharedSave": "Tallenna",
- "sharedCancel": "Peruuta",
- "sharedAdd": "Lisää",
- "sharedEdit": "Muokkaa",
- "sharedRemove": "Poista",
- "sharedRemoveConfirm": "Poista kohde?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Tunti",
- "sharedMinute": "Minuutti",
- "sharedSecond": "Sekunti",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Virhe",
- "errorUnknown": "Tuntematon virhe",
- "errorConnection": "Yhteysvirhe",
- "userEmail": "Email",
- "userPassword": "Salasana",
- "userAdmin": "Ylläpito",
- "userRemember": "Remember",
- "loginTitle": "Kirjaudu",
- "loginLanguage": "Kieli",
- "loginRegister": "Rekisteröidy",
- "loginLogin": "Kirjaudu",
- "loginFailed": "Virheellinen email tai salasana",
- "loginCreated": "Uusi käyttäjä on rekisteröitynyt",
- "loginLogout": "Kirjaudu ulos",
- "devicesAndState": "Laitteet ja Tilat",
- "deviceDialog": "Laite",
- "deviceTitle": "Laitteet",
- "deviceIdentifier": "Tunniste",
- "deviceLastUpdate": "Viimeisin päivitys",
- "deviceCommand": "Komento",
- "deviceFollow": "Seuraa",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Asetukset",
- "settingsUser": "Tili",
- "settingsGroups": "Groups",
- "settingsServer": "Palvelin",
- "settingsUsers": "Käyttäjät",
- "settingsDistanceUnit": "Etäisyys",
- "settingsSpeedUnit": "Nopeus",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Raportit",
- "reportDevice": "Laite",
- "reportFrom": "Mistä",
- "reportTo": "Mihin",
- "reportShow": "Näytä",
- "reportClear": "Tyhjennä",
- "positionFixTime": "Aika",
- "positionValid": "Kelvollinen",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Korkeus",
- "positionSpeed": "Nopeus",
- "positionCourse": "Suunta",
- "positionAddress": "Osoite",
- "positionProtocol": "Protokolla",
- "serverTitle": "Palvelinasetukset",
- "serverZoom": "Lähennä",
- "serverRegistration": "Rekisteröinti",
- "serverReadonly": "Vain luku",
- "mapTitle": "Kartta",
- "mapLayer": "Karttataso",
- "mapCustom": "Oma kartta",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps avain",
- "mapBingRoad": "Bign Maps tiet",
- "mapBingAerial": "Bing Maps ilmakuva",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Tila",
- "stateName": "Ominaisuus",
- "stateValue": "Arvo",
- "commandTitle": "Komento",
- "commandSend": "Lähetä",
- "commandType": "Tyyppi",
- "commandSent": "Komento on lähetetty",
- "commandPositionPeriodic": "Määräaikaisraportointi",
- "commandPositionStop": "Lopeta raportointi",
- "commandEngineStop": "Sammuta moottori",
- "commandEngineResume": "Palauta moottori",
- "commandFrequency": "Taajuus",
- "commandUnit": "Yksikkö",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/fr.json b/web/l10n/fr.json
deleted file mode 100644
index 487dd7acd..000000000
--- a/web/l10n/fr.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Chargement...",
- "sharedSave": "Enregistrer",
- "sharedCancel": "Annuler",
- "sharedAdd": "Ajouter",
- "sharedEdit": "Editer",
- "sharedRemove": "Effacer",
- "sharedRemoveConfirm": "Effacer objet?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "nd",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Heure",
- "sharedMinute": "Minute",
- "sharedSecond": "Seconde",
- "sharedName": "Nom",
- "sharedDescription": "Description",
- "sharedSearch": "Recherche",
- "sharedGeofence": "Périmètre virtuel",
- "sharedGeofences": "Périmètres virtuels",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributs",
- "sharedAttribute": "Attribut",
- "sharedArea": "Aire",
- "sharedMute": "Mute",
- "errorTitle": "Erreur",
- "errorUnknown": "Erreur inconnue",
- "errorConnection": "Erreur de connexion",
- "userEmail": "Email",
- "userPassword": "Mot de Passe",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Identification",
- "loginLanguage": "Langue",
- "loginRegister": "Inscription",
- "loginLogin": "Se connecter",
- "loginFailed": "Adresse email ou mot de passe incorrect",
- "loginCreated": "Nouvel utilisateur enregistré",
- "loginLogout": "Déconnexion",
- "devicesAndState": "Dispositifs et Etat",
- "deviceDialog": "Dispositif",
- "deviceTitle": "Dispositifs",
- "deviceIdentifier": "Identifiant",
- "deviceLastUpdate": "Dernière mise à jour",
- "deviceCommand": "Commande",
- "deviceFollow": "Suivre",
- "groupDialog": "Groupe",
- "groupParent": "Groupe",
- "groupNoGroup": "Sans groupe",
- "settingsTitle": "Paramètres",
- "settingsUser": "Compte",
- "settingsGroups": "Groupes",
- "settingsServer": "Serveur",
- "settingsUsers": "Utilisateurs",
- "settingsDistanceUnit": "Distance",
- "settingsSpeedUnit": "Vitesse",
- "settingsTwelveHourFormat": "Format d'heure - 12 heures",
- "reportTitle": "Rapports",
- "reportDevice": "Dispositif",
- "reportFrom": "De",
- "reportTo": "A",
- "reportShow": "Afficher",
- "reportClear": "Effacer",
- "positionFixTime": "Heure",
- "positionValid": "Valide",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "Vitesse",
- "positionCourse": "Orientation",
- "positionAddress": "Adresse",
- "positionProtocol": "Protocole",
- "serverTitle": "Paramètres de serveur",
- "serverZoom": "Zoom",
- "serverRegistration": "Inscription",
- "serverReadonly": "Lecture seule",
- "mapTitle": "Carte",
- "mapLayer": "Couche cartographique",
- "mapCustom": "Carte personnalisée",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Map Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygone",
- "mapShapeCircle": "Cercle",
- "stateTitle": "Etat",
- "stateName": "Paramètre",
- "stateValue": "Valeur",
- "commandTitle": "Commande",
- "commandSend": "Envoyer",
- "commandType": "Type",
- "commandSent": "Commande envoyée",
- "commandPositionPeriodic": "Périodicité du rapport de position",
- "commandPositionStop": "Arrêt du rapport de position",
- "commandEngineStop": "Arrêt moteur",
- "commandEngineResume": "Démarrage moteur",
- "commandFrequency": "Fréquence",
- "commandUnit": "Unité",
- "commandCustom": "Commande personnalisée",
- "commandPositionSingle": "Rapport de position unique",
- "commandAlarmArm": "Activer l'alarme",
- "commandAlarmDisarm": "Désactiver l'alarme",
- "commandSetTimezone": "Régler le fuseau horaire",
- "commandRequestPhoto": "Demander une photo",
- "commandRebootDevice": "Redémarrer l'appareil",
- "commandSendSms": "Envoyer un SMS",
- "commandSosNumber": "Régler le n° SOS",
- "commandSilenceTime": "Définir le temps de silence",
- "commandSetPhonebook": "Définir l'annuaire",
- "commandVoiceMessage": "Message vocal",
- "commandOutputControl": "Contrôle de la sortie",
- "commandAlarmSpeed": "Alarme de dépassement de vitesse",
- "commandDeviceIdentification": "Identification de l'appareil",
- "eventDeviceOnline": "L'appareil est en ligne",
- "eventDeviceOffline": "L'appareil est hors-ligne",
- "eventDeviceMoving": "L'appareil est en mouvement",
- "eventDeviceStopped": "L'appareil est arrêté",
- "eventDeviceOverspeed": "L'appareil dépasse la vitesse",
- "eventCommandResult": "Résultat de la commande",
- "eventGeofenceEnter": "L'appareil est entré dans un périmètre virtuel",
- "eventGeofenceExit": "L'appareil est sorti d'un périmètre virtuel",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type de notification",
- "notificationWeb": "Envoyer par internet",
- "notificationMail": "Envoyer par E-mail"
-} \ No newline at end of file
diff --git a/web/l10n/he.json b/web/l10n/he.json
deleted file mode 100644
index a2bb338bb..000000000
--- a/web/l10n/he.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "בטעינה...",
- "sharedSave": "שמור",
- "sharedCancel": "ביטול",
- "sharedAdd": "הוסף",
- "sharedEdit": "ערוך",
- "sharedRemove": "הסר",
- "sharedRemoveConfirm": "הסר פריט",
- "sharedKm": "ק\"מ",
- "sharedMi": "מייל",
- "sharedKn": "kn",
- "sharedKmh": "ק\"מ/שעה",
- "sharedMph": "מייל/שעה",
- "sharedHour": "שעה",
- "sharedMinute": "דקה",
- "sharedSecond": "שנייה",
- "sharedName": "שם",
- "sharedDescription": "תיאור",
- "sharedSearch": "חיפוש",
- "sharedGeofence": "גדר וירטואלית",
- "sharedGeofences": "גדרות וירטואליות",
- "sharedNotifications": "התראות",
- "sharedAttributes": "מאפיינים",
- "sharedAttribute": "מאפיין",
- "sharedArea": "איזור",
- "sharedMute": "Mute",
- "errorTitle": "שגיאה",
- "errorUnknown": "שגיאה לא ידועה",
- "errorConnection": "בעייה בחיבור",
- "userEmail": "אימייל",
- "userPassword": "סיסמה",
- "userAdmin": "אדמין",
- "userRemember": "זכור אותי",
- "loginTitle": "כניסה",
- "loginLanguage": "שפה",
- "loginRegister": "הרשם",
- "loginLogin": "כניסה",
- "loginFailed": "אימייל או סיסמה שגויים",
- "loginCreated": "משתמש חדש נרשם",
- "loginLogout": "יציאה",
- "devicesAndState": "מכשירים וסטטוס",
- "deviceDialog": "מכשיר",
- "deviceTitle": "מכשירים",
- "deviceIdentifier": "מזהה",
- "deviceLastUpdate": "עודכן לאחרונה",
- "deviceCommand": "פקודה",
- "deviceFollow": "עקוב",
- "groupDialog": "קבוצה",
- "groupParent": "קבוצה",
- "groupNoGroup": "ללא קבוצה",
- "settingsTitle": "הגדרות",
- "settingsUser": "חשבון",
- "settingsGroups": "קבוצות",
- "settingsServer": "שרת",
- "settingsUsers": "משתמשים",
- "settingsDistanceUnit": "מרחק",
- "settingsSpeedUnit": "מהירות",
- "settingsTwelveHourFormat": "פורמט של 12 שעות",
- "reportTitle": "דו\"חות",
- "reportDevice": "מכשיר",
- "reportFrom": "מ-",
- "reportTo": "עד",
- "reportShow": "הצג",
- "reportClear": "נקה",
- "positionFixTime": "זמן",
- "positionValid": "תקין",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "מהירות",
- "positionCourse": "מסלול",
- "positionAddress": "כתובת",
- "positionProtocol": "פרוטוקול",
- "serverTitle": "הגדרות שרת",
- "serverZoom": "זום",
- "serverRegistration": "הרשמה",
- "serverReadonly": "לקריאה בלבד",
- "mapTitle": "מפה",
- "mapLayer": "שכבת מפה",
- "mapCustom": "מפה בהתאמה",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "פוליגון",
- "mapShapeCircle": "מעגל",
- "stateTitle": "מצב",
- "stateName": "תכונה",
- "stateValue": "ערך",
- "commandTitle": "פקודה",
- "commandSend": "שליחה",
- "commandType": "סוג",
- "commandSent": "הפקודה נשלחה",
- "commandPositionPeriodic": "דיווח תקופתי",
- "commandPositionStop": "עצור דיווח",
- "commandEngineStop": "דומם מנוע",
- "commandEngineResume": "הפעל מנוע",
- "commandFrequency": "תדירות",
- "commandUnit": "יחידה",
- "commandCustom": "פקודה בהתאמה אישית",
- "commandPositionSingle": "דו\"ח יחיד",
- "commandAlarmArm": "הפעלת אזעקה",
- "commandAlarmDisarm": "נטרול אזעקה",
- "commandSetTimezone": "קבע איזור זמן",
- "commandRequestPhoto": "בקשה לתמונה",
- "commandRebootDevice": "איתחול המכשיר",
- "commandSendSms": "שלח סמס",
- "commandSosNumber": "קבע מספר חירום",
- "commandSilenceTime": "קבע משך זמן הדממה",
- "commandSetPhonebook": "הגדר ספר טלפונים",
- "commandVoiceMessage": "הודעה קולית",
- "commandOutputControl": "בקרת פלט",
- "commandAlarmSpeed": "התראת מהירות",
- "commandDeviceIdentification": "זיהוי מכשיר",
- "eventDeviceOnline": "המכשיר און לין",
- "eventDeviceOffline": "המכשיר מנותק",
- "eventDeviceMoving": "המכשיר בתזוזה",
- "eventDeviceStopped": "המכשיר עצר",
- "eventDeviceOverspeed": "המכשיר עבר את המהירות המותרת",
- "eventCommandResult": "תוצאות הפקודה",
- "eventGeofenceEnter": "המכשיר נכנס לתחום המוגדר",
- "eventGeofenceExit": "המכשיר יצא מהתחום המוגדר",
- "eventAlarm": "אזעקות",
- "alarm": "אזעקה",
- "alarmSos": "אתרעת SOS",
- "alarmVibration": "אזעקת רטט",
- "alarmMovement": "אזעקת תנועה",
- "alarmOverspeed": "אזעקת מהירות יתר",
- "alarmFallDown": "אזעקת נפילה",
- "alarmLowBattery": "אזעקת סוללה חלשה",
- "alarmMotion": "אזעקת תזוזה",
- "alarmFault": "אזעקת שווא",
- "notificationType": "סוג ההתראה",
- "notificationWeb": "שלח דרך ווב",
- "notificationMail": "שלח באימייל"
-} \ No newline at end of file
diff --git a/web/l10n/hu.json b/web/l10n/hu.json
deleted file mode 100644
index bc9604a39..000000000
--- a/web/l10n/hu.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Betöltés...",
- "sharedSave": "Mentés",
- "sharedCancel": "Mégse",
- "sharedAdd": "Hozzáadás",
- "sharedEdit": "Szerkesztés",
- "sharedRemove": "Törlés",
- "sharedRemoveConfirm": "Biztosan törli?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "csomó",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Óra",
- "sharedMinute": "Perc",
- "sharedSecond": "Másodperc",
- "sharedName": "Név",
- "sharedDescription": "Leírás",
- "sharedSearch": "Keresés",
- "sharedGeofence": "Geokerítés",
- "sharedGeofences": "Geokerítések",
- "sharedNotifications": "Értesítések",
- "sharedAttributes": "Tulajdonságok",
- "sharedAttribute": "Tulajdonság",
- "sharedArea": "Terület",
- "sharedMute": "Mute",
- "errorTitle": "Hiba",
- "errorUnknown": "Ismeretlen hiba",
- "errorConnection": "Kapcsolódási hiba",
- "userEmail": "Email",
- "userPassword": "Jelszó",
- "userAdmin": "Adminisztrátor",
- "userRemember": "Remember",
- "loginTitle": "Bejelentkezés",
- "loginLanguage": "Nyelv",
- "loginRegister": "Regisztráció",
- "loginLogin": "Bejelentkezés",
- "loginFailed": "Hibás email vagy jelszó",
- "loginCreated": "Az új felhasználó sikeresen létrehozva",
- "loginLogout": "Kilépés",
- "devicesAndState": "Eszközök és állapotuk",
- "deviceDialog": "Eszköz",
- "deviceTitle": "Eszközök",
- "deviceIdentifier": "Azonosító",
- "deviceLastUpdate": "Utolsó frissítés",
- "deviceCommand": "Parancs",
- "deviceFollow": "Követ",
- "groupDialog": "Csoport",
- "groupParent": "Csoport",
- "groupNoGroup": "Nincs Csoport",
- "settingsTitle": "Beállítások",
- "settingsUser": "Fiók",
- "settingsGroups": "Csoportok",
- "settingsServer": "Szerver",
- "settingsUsers": "Felhasználók",
- "settingsDistanceUnit": "Távolság",
- "settingsSpeedUnit": "Sebesség",
- "settingsTwelveHourFormat": "12-órás formátum",
- "reportTitle": "Jelentések",
- "reportDevice": "Eszköz",
- "reportFrom": "Kezdő dátum:",
- "reportTo": "Végső dátum:",
- "reportShow": "Mutat",
- "reportClear": "Töröl",
- "positionFixTime": "Idő",
- "positionValid": "Valós",
- "positionLatitude": "Szélességi fok",
- "positionLongitude": "Hosszúsági fok",
- "positionAltitude": "Magasság",
- "positionSpeed": "Sebesség",
- "positionCourse": "Irány",
- "positionAddress": "Cím",
- "positionProtocol": "Protokoll",
- "serverTitle": "Szerver beállítások",
- "serverZoom": "Nagyítás",
- "serverRegistration": "Regisztráció",
- "serverReadonly": "Csak olvasható",
- "mapTitle": "Térkép",
- "mapLayer": "Térkép réteg",
- "mapCustom": "Egyéni térkép",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps kulcs",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Poligon",
- "mapShapeCircle": "Kör",
- "stateTitle": "Helyzet",
- "stateName": "Paraméter",
- "stateValue": "Érték",
- "commandTitle": "Parancs",
- "commandSend": "Küld",
- "commandType": "Típus",
- "commandSent": "A parancs elküldve",
- "commandPositionPeriodic": "Pozició küldés",
- "commandPositionStop": "Pozició küldés vége",
- "commandEngineStop": "Motor letiltás",
- "commandEngineResume": "Motor engedélyezés",
- "commandFrequency": "Frekvencia",
- "commandUnit": "Egység",
- "commandCustom": "Egyedi parancs",
- "commandPositionSingle": "Egyszeri jelentés",
- "commandAlarmArm": "Riasztó élesítés",
- "commandAlarmDisarm": "Riasztó kikapcsolás",
- "commandSetTimezone": "Időzóna beállítás",
- "commandRequestPhoto": "Kép lekérés",
- "commandRebootDevice": "Eszköz újraindítása",
- "commandSendSms": "SMS küldés",
- "commandSosNumber": "SOS szám beállítás",
- "commandSilenceTime": "Csendes idő beállítás",
- "commandSetPhonebook": "Telefonkönyv beállítás",
- "commandVoiceMessage": "Hangüzenet",
- "commandOutputControl": "Kimenet Ellenőrzés",
- "commandAlarmSpeed": "Riasztás Gyorshajtásról",
- "commandDeviceIdentification": "Eszköz azonosító",
- "eventDeviceOnline": "Eszköz online",
- "eventDeviceOffline": "Eszköz offline",
- "eventDeviceMoving": "Eszköz mozog",
- "eventDeviceStopped": "Eszköz megállt",
- "eventDeviceOverspeed": "Eszköz túllépte a sebességkorlátot",
- "eventCommandResult": "Parancs eredmény",
- "eventGeofenceEnter": "Eszköz belépett a geokerítésbe",
- "eventGeofenceExit": "Eszköz kilépett a geokerítésből",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Értesítés Típusa",
- "notificationWeb": "Küldés Weben",
- "notificationMail": "Küldés E-mailben"
-} \ No newline at end of file
diff --git a/web/l10n/id.json b/web/l10n/id.json
deleted file mode 100644
index 1fed27962..000000000
--- a/web/l10n/id.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Memuat...",
- "sharedSave": "Simpan",
- "sharedCancel": "Batal",
- "sharedAdd": "Tambah",
- "sharedEdit": "Ubah",
- "sharedRemove": "Hapus",
- "sharedRemoveConfirm": "Hapus item?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mp/h",
- "sharedHour": "Jam",
- "sharedMinute": "Menit",
- "sharedSecond": "Detik",
- "sharedName": "Nama",
- "sharedDescription": "Description",
- "sharedSearch": "Cari",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Error",
- "errorUnknown": "Error tidak diketahui",
- "errorConnection": "Koneksi error",
- "userEmail": "Email",
- "userPassword": "Sandi",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Masuk",
- "loginLanguage": "Bahasa",
- "loginRegister": "Daftar",
- "loginLogin": "Masuk",
- "loginFailed": "Email atau password salah",
- "loginCreated": "Pengguna baru telah terdaftar",
- "loginLogout": "Keluar",
- "devicesAndState": "Perangkat dan Status",
- "deviceDialog": "Perangkat",
- "deviceTitle": "Perangkat",
- "deviceIdentifier": "Identifikasi",
- "deviceLastUpdate": "Terbaru",
- "deviceCommand": "Perintah",
- "deviceFollow": "Ikuti",
- "groupDialog": "Grup",
- "groupParent": "Grup",
- "groupNoGroup": "No Group",
- "settingsTitle": "Pengaturan",
- "settingsUser": "Akun",
- "settingsGroups": "Grup",
- "settingsServer": "Server",
- "settingsUsers": "Pengguna",
- "settingsDistanceUnit": "Jarak",
- "settingsSpeedUnit": "Kecepatan",
- "settingsTwelveHourFormat": "Format 12 Jam",
- "reportTitle": "Laporan",
- "reportDevice": "Perangkat",
- "reportFrom": "Dari",
- "reportTo": "Ke",
- "reportShow": "Tampil",
- "reportClear": "Bersihkan",
- "positionFixTime": "Waktu",
- "positionValid": "Benar",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Ketinggian",
- "positionSpeed": "Kecepatan",
- "positionCourse": "Arah",
- "positionAddress": "Alamat",
- "positionProtocol": "Protokol",
- "serverTitle": "Pengaturan Server",
- "serverZoom": "Perbesar",
- "serverRegistration": "Pendaftaran",
- "serverReadonly": "Hanya Dilihat",
- "mapTitle": "Peta",
- "mapLayer": "Layer Peta",
- "mapCustom": "Peta Buatan",
- "mapOsm": "Peta Open Street",
- "mapBingKey": "Key untuk Peta Bing",
- "mapBingRoad": "Peta Jalan Bing",
- "mapBingAerial": "Peta Udara Bing",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Status",
- "stateName": "atribut",
- "stateValue": "Nilai",
- "commandTitle": "Perintah",
- "commandSend": "Kirim",
- "commandType": "Tipe",
- "commandSent": "Perintah terkirim",
- "commandPositionPeriodic": "Laporan berkala",
- "commandPositionStop": "Stop Laporan",
- "commandEngineStop": "Stop Mesin",
- "commandEngineResume": "Mulai Mesin",
- "commandFrequency": "Frekuensi",
- "commandUnit": "unit",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/it.json b/web/l10n/it.json
deleted file mode 100644
index ae9184a83..000000000
--- a/web/l10n/it.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Loading...",
- "sharedSave": "Salva",
- "sharedCancel": "Cancella",
- "sharedAdd": "Aggiungi",
- "sharedEdit": "Modifica",
- "sharedRemove": "Rimuovi",
- "sharedRemoveConfirm": "Rimuovere oggetto?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Ora",
- "sharedMinute": "Minuto",
- "sharedSecond": "Secondo",
- "sharedName": "Nome",
- "sharedDescription": "Descrizione",
- "sharedSearch": "Cerca",
- "sharedGeofence": "GeoRecinto",
- "sharedGeofences": "GeoRecinto",
- "sharedNotifications": "Notifiche",
- "sharedAttributes": "Attributi",
- "sharedAttribute": "Attributo",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Errore",
- "errorUnknown": "Errore sconosciuto",
- "errorConnection": "Errore di connessione",
- "userEmail": "Email",
- "userPassword": "Password",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Login",
- "loginLanguage": "Lingua",
- "loginRegister": "Registrazione",
- "loginLogin": "Login",
- "loginFailed": "Indirizzo email o password errati",
- "loginCreated": "Un nuovo utente si e` registrato",
- "loginLogout": "Logout",
- "devicesAndState": "Dispositivi e stato",
- "deviceDialog": "Dispositivo",
- "deviceTitle": "Dispositivi",
- "deviceIdentifier": "Identificativo",
- "deviceLastUpdate": "Ultimo aggiornamento",
- "deviceCommand": "Comando",
- "deviceFollow": "Segui",
- "groupDialog": "Gruppo",
- "groupParent": "Gruppo",
- "groupNoGroup": "Nessun Gruppo",
- "settingsTitle": "Impostazioni",
- "settingsUser": "Account",
- "settingsGroups": "Gruppi",
- "settingsServer": "Server",
- "settingsUsers": "Utenti",
- "settingsDistanceUnit": "Distanza",
- "settingsSpeedUnit": "Velocità",
- "settingsTwelveHourFormat": "Formato 12 ore",
- "reportTitle": "Reports",
- "reportDevice": "Dispositivo",
- "reportFrom": "Da",
- "reportTo": "A",
- "reportShow": "Visualizza",
- "reportClear": "Pulisci",
- "positionFixTime": "Tempo",
- "positionValid": "Valido",
- "positionLatitude": "Latitudine",
- "positionLongitude": "Longitudine",
- "positionAltitude": "Altitudine",
- "positionSpeed": "Velocità",
- "positionCourse": "Percorso",
- "positionAddress": "Indirizzo",
- "positionProtocol": "Protocollo",
- "serverTitle": "Impostazioni Server",
- "serverZoom": "Zoom",
- "serverRegistration": "Registrazione",
- "serverReadonly": "Sola lettura",
- "mapTitle": "Mappa",
- "mapLayer": "Livelli Mappa",
- "mapCustom": "Mappa Personalizzata",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Poligono",
- "mapShapeCircle": "Cerchio",
- "stateTitle": "Stato",
- "stateName": "Attributo",
- "stateValue": "Valore",
- "commandTitle": "Commando",
- "commandSend": "Invia",
- "commandType": "Tipo",
- "commandSent": "Commando inviato",
- "commandPositionPeriodic": "Report periodici",
- "commandPositionStop": "Ferma i report",
- "commandEngineStop": "Ferma Engine",
- "commandEngineResume": "Riavvio Engine",
- "commandFrequency": "Frequenza",
- "commandUnit": "Unità ",
- "commandCustom": "Comando personalizzato",
- "commandPositionSingle": "Report singolo",
- "commandAlarmArm": "Attiva allarme",
- "commandAlarmDisarm": "Disattiva Allarme",
- "commandSetTimezone": "Imposta Timezone",
- "commandRequestPhoto": "Richiedi foto",
- "commandRebootDevice": "Riavvia dispositivo",
- "commandSendSms": "Invia SMS",
- "commandSosNumber": "Imposta Numero SOS",
- "commandSilenceTime": "Imposta Orario Silenzione",
- "commandSetPhonebook": "Imposta rubrica",
- "commandVoiceMessage": "Messaggio vocale",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Dispositivo online",
- "eventDeviceOffline": "Dispositivo offline",
- "eventDeviceMoving": "Dispositivo in movimento",
- "eventDeviceStopped": "Dispositivo fermo",
- "eventDeviceOverspeed": "Dispostivo troppo veloce",
- "eventCommandResult": "Risultato comando",
- "eventGeofenceEnter": "Il dipositivo e` entrato nel GeoRecinto",
- "eventGeofenceExit": "Il dipositivo e` uscito dal GeoRecinto",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Tipo notica",
- "notificationWeb": "Invia tramite Web",
- "notificationMail": "Invia tramite Mail"
-} \ No newline at end of file
diff --git a/web/l10n/ka.json b/web/l10n/ka.json
deleted file mode 100644
index f8f8d50a5..000000000
--- a/web/l10n/ka.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "იტვირთება...",
- "sharedSave": "შენახვა",
- "sharedCancel": "უარყოფა",
- "sharedAdd": "დამატება",
- "sharedEdit": "შეცვლა",
- "sharedRemove": "წაშლა",
- "sharedRemoveConfirm": "გსურთ წაშლა ?",
- "sharedKm": "კმ",
- "sharedMi": "მლ",
- "sharedKn": "kn",
- "sharedKmh": "კმ/სთ",
- "sharedMph": "მლ/სთ",
- "sharedHour": "საათი",
- "sharedMinute": "წუთი",
- "sharedSecond": "წამი",
- "sharedName": "დასახელება",
- "sharedDescription": "Description",
- "sharedSearch": "ძებნა",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "შეცდომა",
- "errorUnknown": "უცნობი შეცდომა",
- "errorConnection": "კავშირის შეცდომა",
- "userEmail": "ელ-ფოსტა",
- "userPassword": "პაროლი",
- "userAdmin": "ადმინი",
- "userRemember": "Remember",
- "loginTitle": "ავტორიზაცია",
- "loginLanguage": "ენა",
- "loginRegister": "რეგისტრაცია",
- "loginLogin": "შესვლა",
- "loginFailed": "არასწორი ელ-ფოსტა ან პაროლი",
- "loginCreated": "ახალი მომხარებელი დარეგისტრირდა",
- "loginLogout": "გამოსვლა",
- "devicesAndState": "მოწყობილობები და სტატუსი",
- "deviceDialog": "მოწყობილობა",
- "deviceTitle": "მოწყობილობები",
- "deviceIdentifier": "იდენტიფიკატორი",
- "deviceLastUpdate": "ბოლო განახლება",
- "deviceCommand": "ბრძანება",
- "deviceFollow": "გაყოლა",
- "groupDialog": "ჯგუფი",
- "groupParent": "ჯგუფი",
- "groupNoGroup": "No Group",
- "settingsTitle": "პარამეტრები",
- "settingsUser": "პროფილი",
- "settingsGroups": "ჯგუფები",
- "settingsServer": "სერვერი",
- "settingsUsers": "მომხამრებლები",
- "settingsDistanceUnit": "მანძილი",
- "settingsSpeedUnit": "სიჩქარე",
- "settingsTwelveHourFormat": "12-საათიანი ფორმატი",
- "reportTitle": "რეპორტები",
- "reportDevice": "მოწყობილობა",
- "reportFrom": "დან",
- "reportTo": "მდე",
- "reportShow": "ჩვენება",
- "reportClear": "გასუფთავება",
- "positionFixTime": "დრო",
- "positionValid": "ვარგისი",
- "positionLatitude": "განედი",
- "positionLongitude": "გრძედი",
- "positionAltitude": "სიმაღლე",
- "positionSpeed": "სიჩქარე",
- "positionCourse": "კურსი",
- "positionAddress": "მისამართი",
- "positionProtocol": "პროტოკოლი",
- "serverTitle": "სერვერის პარამეტრები",
- "serverZoom": "ზუმი",
- "serverRegistration": "რეგისტრაცია",
- "serverReadonly": "მხოლოდ ნახვის",
- "mapTitle": "რუკა",
- "mapLayer": "რუკის ფენა",
- "mapCustom": "მომხმარებლის რუკა",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "სტატუსი",
- "stateName": "ატრიბუტი",
- "stateValue": "მნიშვნელობა",
- "commandTitle": "ბრძანება",
- "commandSend": "გაგზავნა",
- "commandType": "ტიპი",
- "commandSent": "ბრძანება გაიგზავნა",
- "commandPositionPeriodic": "პერიოდული რეპორტი",
- "commandPositionStop": "რეპორტის შეჩერება",
- "commandEngineStop": "ძრავის გამორთვა",
- "commandEngineResume": "ძრავის ჩართვა",
- "commandFrequency": "სიხშირე",
- "commandUnit": "ერთეული",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/lo.json b/web/l10n/lo.json
deleted file mode 100644
index bfd641ac9..000000000
--- a/web/l10n/lo.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "ກຳລັງໂຫລດ...",
- "sharedSave": "ບັນທຶກ",
- "sharedCancel": "ຍົກເລີກ",
- "sharedAdd": "ເພີ່ມ",
- "sharedEdit": "ແກ້ໄຂ",
- "sharedRemove": "ລົບອອກ",
- "sharedRemoveConfirm": "ລົບລາຍການນີ້ບໍ່?",
- "sharedKm": "ກມ.",
- "sharedMi": "ໄມລ໌",
- "sharedKn": "ນ໊ອດ",
- "sharedKmh": "ກມ. /ຊມ.",
- "sharedMph": "ໄມລ໌ຕໍ່ຊົ່ວໂມງ",
- "sharedHour": "ຊົ່ວໂມງ",
- "sharedMinute": "ນາທີ",
- "sharedSecond": "ວິນາທີ",
- "sharedName": "ຊື່",
- "sharedDescription": "ລັກສະນະ",
- "sharedSearch": "ຄົ້ນຫາ",
- "sharedGeofence": "ເຂດພື້ນທີ່",
- "sharedGeofences": "ເຂດພື້ນທີ່",
- "sharedNotifications": "ການແຈ້ງເຕືອນ",
- "sharedAttributes": "ຄຸນລັກສະນະ",
- "sharedAttribute": "ຄຸນລັກສະນະ",
- "sharedArea": "ພື້ນທີ່",
- "sharedMute": "ປິດສຽງ",
- "errorTitle": "ຜິດພາດ",
- "errorUnknown": "ຂໍ້ຜິດພາດທີ່ບໍ່ຮູ້ຈັກ",
- "errorConnection": "ການເຊື່ອມຕໍ່ຜິດພາດ",
- "userEmail": "ອີເມວ",
- "userPassword": "ລະຫັດຜ່ານ",
- "userAdmin": "ຜູ້ເບິ່ງແຍງລະບົບ",
- "userRemember": "ຈື່ໄວ້",
- "loginTitle": "ເຂົ້າສູ່ລະບົບ",
- "loginLanguage": "ພາສາ",
- "loginRegister": "ລົງທະບຽນ",
- "loginLogin": "ເຂົ້າສູ່ລະບົບ",
- "loginFailed": "ທີ່ຢູ່ອີເມວຫລືລະຫັດຜ່ານບໍ່ຖືກຕ້ອງ",
- "loginCreated": "ຜູ້ໃຊ້ໃຫມ່ ໄດ້ຮັບການລົງທະບຽນ",
- "loginLogout": "ອອກຈາກລະບົບ",
- "devicesAndState": "ອຸປະກອນແລະສະຖານະ",
- "deviceDialog": "ເຄື່ອງ/ອຸປະກອນ",
- "deviceTitle": "ເຄື່ອງ/ອຸປະກອນ",
- "deviceIdentifier": "ລະບຸເລກອຸປະກອນ",
- "deviceLastUpdate": "ແກ້ໄຂລ່າສຸດ",
- "deviceCommand": "ຄຳສັ່ງ",
- "deviceFollow": "ຕິດຕາມ",
- "groupDialog": "ກຸ່ມ",
- "groupParent": "ກຸ່ມ",
- "groupNoGroup": "ບໍ່ຈັດໃນກຸ່ມ",
- "settingsTitle": "ການຕັ້ງຄ່າ",
- "settingsUser": "ບັນຊີຜູ້ໃຊ້",
- "settingsGroups": "ຕັ້ງຄ່າກຸ່ມ",
- "settingsServer": "ຕັ້ງຄ່າລະບົບ",
- "settingsUsers": "ຕັ້ງຄ່າຜູ້ໃຊ້ງານ",
- "settingsDistanceUnit": "ຫນ່ວຍໄລຍະທາງ",
- "settingsSpeedUnit": "ຫນ່ວຍຄວາມໄວ",
- "settingsTwelveHourFormat": "ຮູບແບບເວລາ 12 ຊົ່ວໂມງ",
- "reportTitle": "ລາຍງານ",
- "reportDevice": "ລາຍງານເຄື່ອງ/ອຸປະກອນ",
- "reportFrom": "ຈາກ",
- "reportTo": "ໄປເຖິງ",
- "reportShow": "ສະແດງ",
- "reportClear": "ລົບລ້າງລາຍງານ",
- "positionFixTime": "ເວລາ",
- "positionValid": "ຖືກຕ້ອງ",
- "positionLatitude": "ລາຕິຈູດ",
- "positionLongitude": "ລອງຈິຈູດ",
- "positionAltitude": "ລະດັບຄວາມສູງ",
- "positionSpeed": "ຄວາມໄວ",
- "positionCourse": "ທິດທາງ",
- "positionAddress": "ທີ່ຢູ່",
- "positionProtocol": "ໂປຣໂຕຄໍລ໌",
- "serverTitle": "ການຕັ້ງຄ່າເຊີເວີ້",
- "serverZoom": "ຂະຫຍາຍ +/-",
- "serverRegistration": "ລົງທະບຽນ",
- "serverReadonly": "ອ່ານໄດ້ຢ່າງດຽວ",
- "mapTitle": "ແຜ່ນທີ",
- "mapLayer": "ຊັ້ນແຜ່ນທີ",
- "mapCustom": "ແຜ່ນທີ່ທີ່ກຳຫນົດເອງ",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps ສຳຄັນ",
- "mapBingRoad": "Bing Maps ຖະຫນົນ",
- "mapBingAerial": "Bing Maps ທາງອາກາດ",
- "mapShapePolygon": "ໂພລີກອນ",
- "mapShapeCircle": "ວົງກົມ",
- "stateTitle": "ສະຖານະ",
- "stateName": "ຄຸນລັກສະນະ",
- "stateValue": "ມູນຄ່າ",
- "commandTitle": "ຄຳສັ່ງ",
- "commandSend": "ສົ່ງ",
- "commandType": "ຊະນິດ",
- "commandSent": "ຄຳສັ່ງໄດ້ຖືກສົ່ງແລ້ວ",
- "commandPositionPeriodic": "ແກ້ໄຂຕ່ຳແຫນ່ງ",
- "commandPositionStop": "ຕ່ຳແຫນ່ງ ຢຸດ",
- "commandEngineStop": "ດັບເຄື່ອງຈັກ",
- "commandEngineResume": "ຕິດເຄື່ອງຈັກຄືນໃຫມ່",
- "commandFrequency": "ຄວາມຖີ່",
- "commandUnit": "ຫນ່ວຍ",
- "commandCustom": "ຄຳສັ່ງກຳຫນົດເອງ",
- "commandPositionSingle": "ລາຍງານຕ່ຳແຫນ່ງດຽວ",
- "commandAlarmArm": "ແຈ້ງເຕືອນຕິດຕໍ່ສາຂາ",
- "commandAlarmDisarm": "ແຈ້ງເຕືອນຍົກເລີກຕິດຕໍ່ສາຂາ",
- "commandSetTimezone": "ຕັ້ງຄ່າເຂດເວລາ",
- "commandRequestPhoto": "ສັ່ງຖ່າຍຮູບ",
- "commandRebootDevice": "ຣີບູດ",
- "commandSendSms": "ສົ່ງ SMS",
- "commandSosNumber": "ຕັ້ງຄ່າເລກໝາຍໂທສຸກເສີນ SOS",
- "commandSilenceTime": "ຕັ້ງຄ່າຊ່ວງເວລາຢຸດນິ່ງ",
- "commandSetPhonebook": "ຕັ້ງຄ່າສະໝຸດໂທລະສັບ",
- "commandVoiceMessage": "ຂໍ້ຄວາມສຽງ",
- "commandOutputControl": "ຄວບຄຸມຂໍ້ມູນທີ່ສົ່ງອອກ",
- "commandAlarmSpeed": "ແຈ້ງເຕືອນຄວາມໄວເກີນກຳນົດ",
- "commandDeviceIdentification": "ໝາຍເລກອຸປະກອນ",
- "eventDeviceOnline": "ອຸປະກອນເຊື່ອມຕໍ່ແລ້ວ",
- "eventDeviceOffline": "ອຸປະກອນບໍ່ໄດ້ເຊື່ອມຕໍ່",
- "eventDeviceMoving": "ອຸປະກອນກຳລັງເຄື່ອນທີ່",
- "eventDeviceStopped": "ອຸປະກອນບໍ່ເຄື່ອນໄຫວ",
- "eventDeviceOverspeed": "ອຸປະກອນເກີນກຳນົດຄວາມໄວ",
- "eventCommandResult": "ຜົນຮັບຈາກຄຳສັ່ງ",
- "eventGeofenceEnter": "ອຸປະກອນເຂົ້າໃນເຂດພື້ນທີ່",
- "eventGeofenceExit": "ອຸປະກອນອອກນອກເຂດພື້ນທີ່",
- "eventAlarm": "ລາຍການແຈ້ງເຕືອນ",
- "alarm": "ແຈ້ງເຕືອນ",
- "alarmSos": "ແຈ້ງເຕືອນ SOS",
- "alarmVibration": "ແຈ້ງເຕືອນແບບສັ່ນ",
- "alarmMovement": "ແຈ້ງເຕືອນມີການເຄື່ອນທີ່",
- "alarmOverspeed": "ແຈ້ງເຕືອນຄວາມໄວສູງເກີນກຳນົດ",
- "alarmFallDown": "ແຈ້ງເຕືອນການຕົກ",
- "alarmLowBattery": "ແຈ້ງເຕືອນແບັດເຕີລີ້ອ່ອນ",
- "alarmMotion": "ແຈ້ງເຕື່ອນການເຄື່ອນທີ່",
- "alarmFault": "ແຈ້ງເຕື່ອນຜິດພາດ",
- "notificationType": "ຊະນິດການແຈ້ງເຕືອນ",
- "notificationWeb": "ສົ່ງທາງເວັບ",
- "notificationMail": "ສົ່ງທາງເມວ"
-} \ No newline at end of file
diff --git a/web/l10n/lt.json b/web/l10n/lt.json
deleted file mode 100644
index 4ea7b5847..000000000
--- a/web/l10n/lt.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Kraunasi..",
- "sharedSave": "Išsaugoti",
- "sharedCancel": "Atšaukti",
- "sharedAdd": "Pridėti",
- "sharedEdit": "Redaguoti",
- "sharedRemove": "Ištrinti",
- "sharedRemoveConfirm": "Ar tikrais norite ištrinti?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "mazgai",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Valanda(-os)",
- "sharedMinute": "Minutė(-es)",
- "sharedSecond": "Sekundė(-es)",
- "sharedName": "Pavadinimas",
- "sharedDescription": "Description",
- "sharedSearch": "Paieška",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Klaida",
- "errorUnknown": "Nenumatyta klaida",
- "errorConnection": "Ryšio klaida",
- "userEmail": "Vartotojo vardas",
- "userPassword": "Slaptažodis",
- "userAdmin": "Administratorius",
- "userRemember": "Remember",
- "loginTitle": "Prisijungimas",
- "loginLanguage": "Kalba",
- "loginRegister": "Registruotis",
- "loginLogin": "Prisijungti",
- "loginFailed": "Neteisingas el.paštas ir/ar slaptažodis",
- "loginCreated": "Registracija sėkminga",
- "loginLogout": "Atsijungti",
- "devicesAndState": "Prietaisai ir Statusas",
- "deviceDialog": "Prietaisas",
- "deviceTitle": "Prietaisai",
- "deviceIdentifier": "Identifikacinis kodas",
- "deviceLastUpdate": "Naujausias atnaujinimas",
- "deviceCommand": "Komanda",
- "deviceFollow": "Sekti",
- "groupDialog": "Grupė",
- "groupParent": "Grupė",
- "groupNoGroup": "Nenurodyta grupė",
- "settingsTitle": "Nustatymai",
- "settingsUser": "Paskyra",
- "settingsGroups": "Grupės",
- "settingsServer": "Serveris",
- "settingsUsers": "Vartotojai",
- "settingsDistanceUnit": "Atstumas",
- "settingsSpeedUnit": "Greitis",
- "settingsTwelveHourFormat": "12-val formatas",
- "reportTitle": "Ataskaita",
- "reportDevice": "Prietaisas",
- "reportFrom": "Nuo",
- "reportTo": "Iki",
- "reportShow": "Rodyti",
- "reportClear": "Valyti",
- "positionFixTime": "Laikas",
- "positionValid": "Galiojantis",
- "positionLatitude": "Platuma",
- "positionLongitude": "Ilguma",
- "positionAltitude": "Aukštis",
- "positionSpeed": "Greitis",
- "positionCourse": "Eiga",
- "positionAddress": "Adresas",
- "positionProtocol": "Protokolas",
- "serverTitle": "Serverio nustatymai",
- "serverZoom": "Priartinimas",
- "serverRegistration": "Registracija",
- "serverReadonly": "Skaitymo",
- "mapTitle": "Žemėlapis",
- "mapLayer": "Žemėlapio sluoksnis",
- "mapCustom": "Pasirinktinis Žemėlapis",
- "mapOsm": "Open Street žemėlapis",
- "mapBingKey": "Bing Maps raktas",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Būklė",
- "stateName": "Parametras",
- "stateValue": "Reikšmė",
- "commandTitle": "Komanda",
- "commandSend": "Siųsti",
- "commandType": "Tipas",
- "commandSent": "Komanda buvo išsiųsta",
- "commandPositionPeriodic": "Periodinės ataskaitos",
- "commandPositionStop": "Stabdyti ataskaitas",
- "commandEngineStop": "Stabdyti variklį",
- "commandEngineResume": "Paleisti variklį",
- "commandFrequency": "Dažnis",
- "commandUnit": "Vienetai",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/ml.json b/web/l10n/ml.json
deleted file mode 100644
index eaf288e9f..000000000
--- a/web/l10n/ml.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "ലോഡുചെയ്യുന്നു ..",
- "sharedSave": "രക്ഷിക്കും",
- "sharedCancel": "റദ്ദാക്കുക",
- "sharedAdd": "ചേര്‍ക്കുക",
- "sharedEdit": "തിരുത്തുക",
- "sharedRemove": "നീക്കം ചെയ്യുക",
- "sharedRemoveConfirm": "വിഷയം നീക്കം ചെയ്യുക",
- "sharedKm": "കിലോമീറ്റർ",
- "sharedMi": "നാഴിക",
- "sharedKn": "കുരുക്ക്",
- "sharedKmh": "കിലോമീറ്റർ / മണിക്കൂർ",
- "sharedMph": "മണിക്കൂറിൽ മൈൽ",
- "sharedHour": "മണിക്കൂര്",
- "sharedMinute": "മിനിറ്റ്",
- "sharedSecond": "സെക്കന്റ്",
- "sharedName": "പേര്\n",
- "sharedDescription": "വിവരണം",
- "sharedSearch": "തിരയൽ",
- "sharedGeofence": "എർത്ത് വേലി",
- "sharedGeofences": "ശില്പ്പശാല എർത്ത്",
- "sharedNotifications": "അറിയിപ്പുകൾ",
- "sharedAttributes": "ഗുണവിശേഷങ്ങൾ",
- "sharedAttribute": "ഗുണവിശേഷങ്ങ",
- "sharedArea": "പ്രദേശം",
- "sharedMute": "Mute",
- "errorTitle": "പിശക്‌",
- "errorUnknown": "അജ്ഞാത പിശക്",
- "errorConnection": "കണക്ഷൻ പിശക്",
- "userEmail": "ഇമെയിൽ",
- "userPassword": "രഹസ്യ കോഡ്‌",
- "userAdmin": "നിർവാജി ",
- "userRemember": "Remember",
- "loginTitle": "അകത്തു പ്രവേശിക്കുക",
- "loginLanguage": "ഭാഷ",
- "loginRegister": "രെജിസ്റ്റർ ",
- "loginLogin": "അകത്തു പ്രവേശിക്കുക",
- "loginFailed": "തെറ്റായ ഇമെയിൽ വിലാസവും പാസ്വേഡും",
- "loginCreated": "പുതിയ ഉപയോക്താവ് രജിസ്റ്റർ ചെയ്തു",
- "loginLogout": "പുറത്തുകടക്കുക",
- "devicesAndState": "സാധനങ്ങളിന് നില ",
- "deviceDialog": "ഉപകരണം",
- "deviceTitle": "സാധനങ്ങളിന് ",
- "deviceIdentifier": "ഐഡന്റിഫയർ",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Command",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Settings",
- "settingsUser": "Account",
- "settingsGroups": "Groups",
- "settingsServer": "Server",
- "settingsUsers": "Users",
- "settingsDistanceUnit": "Distance",
- "settingsSpeedUnit": "വേഗം",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Reports",
- "reportDevice": "ഉപകരണം",
- "reportFrom": "From",
- "reportTo": "To",
- "reportShow": "Show",
- "reportClear": "Clear",
- "positionFixTime": "സമയം",
- "positionValid": "Valid",
- "positionLatitude": "അക്ഷാംശം",
- "positionLongitude": "രേഖാംശം",
- "positionAltitude": "Altitude",
- "positionSpeed": "വേഗം",
- "positionCourse": "Course",
- "positionAddress": "Address",
- "positionProtocol": "Protocol",
- "serverTitle": "Server Settings",
- "serverZoom": "വലുതാക്കിയോ ചെറുതാക്കിയോ കാണിക്കുക",
- "serverRegistration": "രജിസ്ട്രേഷൻ",
- "serverReadonly": "Readonly",
- "mapTitle": "ഭൂപടം",
- "mapLayer": "Map Layer",
- "mapCustom": "Custom Map",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "State",
- "stateName": "Attribute",
- "stateValue": "Value",
- "commandTitle": "Command",
- "commandSend": "Send",
- "commandType": "Type",
- "commandSent": "Command has been sent",
- "commandPositionPeriodic": "Periodic Reporting",
- "commandPositionStop": "Stop Reporting",
- "commandEngineStop": "Engine Stop",
- "commandEngineResume": "Engine Resume",
- "commandFrequency": "Frequency",
- "commandUnit": "Unit",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/ms.json b/web/l10n/ms.json
deleted file mode 100644
index ecb769e9a..000000000
--- a/web/l10n/ms.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Memuatkan...",
- "sharedSave": "Simpan",
- "sharedCancel": "Batal",
- "sharedAdd": "Tambah",
- "sharedEdit": "Ubah",
- "sharedRemove": "Hapus",
- "sharedRemoveConfirm": "Hapuskan item?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Jam",
- "sharedMinute": "Minit",
- "sharedSecond": "Saat",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Ralat",
- "errorUnknown": "Ralat tidak diketahui",
- "errorConnection": "Ralat penyambungan",
- "userEmail": "Emel",
- "userPassword": "Katalaluan",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Log masuk",
- "loginLanguage": "Bahasa",
- "loginRegister": "Daftar",
- "loginLogin": "Log masuk",
- "loginFailed": "Kesalahan emel atau katalaluan",
- "loginCreated": "Pengguna baru telah didaftarkan",
- "loginLogout": "Keluar",
- "devicesAndState": "Peranti dan State",
- "deviceDialog": "Peranti",
- "deviceTitle": "Peranti",
- "deviceIdentifier": "IMEI/ID",
- "deviceLastUpdate": "Kemaskini Terakhir",
- "deviceCommand": "Arahan",
- "deviceFollow": "Ikut",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Tetapan",
- "settingsUser": "Akaun",
- "settingsGroups": "Groups",
- "settingsServer": "Server",
- "settingsUsers": "Pengguna",
- "settingsDistanceUnit": "Jarak",
- "settingsSpeedUnit": "Kelajuan",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Laporan",
- "reportDevice": "Peranti",
- "reportFrom": "Daripada",
- "reportTo": "Ke",
- "reportShow": "Papar",
- "reportClear": "Kosongkan",
- "positionFixTime": "Masa",
- "positionValid": "Sah",
- "positionLatitude": "Latitud",
- "positionLongitude": "Longitud",
- "positionAltitude": "Altitud",
- "positionSpeed": "Kelajuan",
- "positionCourse": "Course",
- "positionAddress": "Alamat",
- "positionProtocol": "Protokol",
- "serverTitle": "Tetapan Server",
- "serverZoom": "Besarkan",
- "serverRegistration": "Pendaftaran",
- "serverReadonly": "Baca Sahaja",
- "mapTitle": "Peta",
- "mapLayer": "Map Layer",
- "mapCustom": "Peta Lain",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Negeri",
- "stateName": "Atribut",
- "stateValue": "Nilai",
- "commandTitle": "Arahan",
- "commandSend": "Hantar",
- "commandType": "Jenis",
- "commandSent": "Arahan telah dihantar",
- "commandPositionPeriodic": "Laporan Berkala",
- "commandPositionStop": "Hentikan Laporan",
- "commandEngineStop": "Matikan Enjin",
- "commandEngineResume": "Hidupkan Enjin",
- "commandFrequency": "Frekuensi",
- "commandUnit": "Unit",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/nb.json b/web/l10n/nb.json
deleted file mode 100644
index db6273d96..000000000
--- a/web/l10n/nb.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Laster...",
- "sharedSave": "Lagre",
- "sharedCancel": "Avbryt",
- "sharedAdd": "Legg til",
- "sharedEdit": "Endre",
- "sharedRemove": "Fjern",
- "sharedRemoveConfirm": "Fjern element?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/t",
- "sharedMph": "mph",
- "sharedHour": "Time",
- "sharedMinute": "Minutt",
- "sharedSecond": "Sekund",
- "sharedName": "Navn",
- "sharedDescription": "Beskrivelse",
- "sharedSearch": "Søk",
- "sharedGeofence": "geo-gjerde",
- "sharedGeofences": "Geo-gjerder",
- "sharedNotifications": "Varsel",
- "sharedAttributes": "Egenskaper",
- "sharedAttribute": "Egenskap",
- "sharedArea": "Område",
- "sharedMute": "Mute",
- "errorTitle": "Feil",
- "errorUnknown": "Ukjent feil",
- "errorConnection": "Forbindelse feilet",
- "userEmail": "E-post",
- "userPassword": "Passord",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Logg inn",
- "loginLanguage": "Språk",
- "loginRegister": "Registrer",
- "loginLogin": "Logg inn",
- "loginFailed": "Feil e-post eller passord",
- "loginCreated": "Ny bruker har blitt registrert",
- "loginLogout": "Logg ut",
- "devicesAndState": "Enheter og status",
- "deviceDialog": "Enhet",
- "deviceTitle": "Enheter",
- "deviceIdentifier": "Identifikator",
- "deviceLastUpdate": "Sist oppdatert",
- "deviceCommand": "Kommando",
- "deviceFollow": "Følg",
- "groupDialog": "Gruppe",
- "groupParent": "Gruppe",
- "groupNoGroup": "Ingen gruppe",
- "settingsTitle": "Innstillinger",
- "settingsUser": "Konto",
- "settingsGroups": "Grupper",
- "settingsServer": "Server",
- "settingsUsers": "Brukere",
- "settingsDistanceUnit": "Avstand",
- "settingsSpeedUnit": "Hastighet",
- "settingsTwelveHourFormat": "Tolvtimersformat",
- "reportTitle": "Rapporter",
- "reportDevice": "Enhet",
- "reportFrom": "Fra",
- "reportTo": "Til",
- "reportShow": "Vis",
- "reportClear": "Nullstill",
- "positionFixTime": "Tid",
- "positionValid": "Gyldig",
- "positionLatitude": "Breddegrad",
- "positionLongitude": "Lengdegrad",
- "positionAltitude": "Høyde",
- "positionSpeed": "Hastighet",
- "positionCourse": "Retning",
- "positionAddress": "Adresse",
- "positionProtocol": "Protokoll",
- "serverTitle": "Serverinnstillinger",
- "serverZoom": "Zoom",
- "serverRegistration": "Registering",
- "serverReadonly": "Skrivebeskyttet",
- "mapTitle": "Kart",
- "mapLayer": "Kartlag",
- "mapCustom": "Egendefinert kart",
- "mapOsm": "Open Street-kart",
- "mapBingKey": "Bing Maps-nøkkel",
- "mapBingRoad": "Bing Maps-veg",
- "mapBingAerial": "Bing Maps-flyfoto",
- "mapShapePolygon": "Mangekant",
- "mapShapeCircle": "Sirkel",
- "stateTitle": "Status",
- "stateName": "Egenskap",
- "stateValue": "Verdi",
- "commandTitle": "Kommando",
- "commandSend": "Send",
- "commandType": "Type",
- "commandSent": "Kommando har blitt sendt",
- "commandPositionPeriodic": "Periodisk rapportering",
- "commandPositionStop": "Stopp rapportering",
- "commandEngineStop": "Stopp motor",
- "commandEngineResume": "Fortsett motor",
- "commandFrequency": "Frekvens",
- "commandUnit": "Enhet",
- "commandCustom": "Egendefinert kommando",
- "commandPositionSingle": "Enkel-rapportering",
- "commandAlarmArm": "Slå alarm på",
- "commandAlarmDisarm": "Slå alarm av",
- "commandSetTimezone": "Sett tidssone",
- "commandRequestPhoto": "Be om foto",
- "commandRebootDevice": "Omstart enhet",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Sett SOS-nummer",
- "commandSilenceTime": "Sett stilletid",
- "commandSetPhonebook": "Sett telefonbok",
- "commandVoiceMessage": "Talemelding",
- "commandOutputControl": "Utgangkontroll",
- "commandAlarmSpeed": "Fartsgrensealarm",
- "commandDeviceIdentification": "Enhetsidentifikasjon",
- "eventDeviceOnline": "Enhet er tilkoblet",
- "eventDeviceOffline": "Enhet er frakoblet",
- "eventDeviceMoving": "Enheten beveger seg",
- "eventDeviceStopped": "Enheten har stoppet",
- "eventDeviceOverspeed": "Enheten bryter fartsgrensen",
- "eventCommandResult": "Kommandoresultat",
- "eventGeofenceEnter": "Enheten har kommet inn i geo-gjerde",
- "eventGeofenceExit": "Enheten har forlatt geo-gjerde",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Varseltype",
- "notificationWeb": "Send via web",
- "notificationMail": "Send via e-post"
-} \ No newline at end of file
diff --git a/web/l10n/ne.json b/web/l10n/ne.json
deleted file mode 100644
index c36b9a6fb..000000000
--- a/web/l10n/ne.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "लोड हुँदै ",
- "sharedSave": "सुरक्षित गर्ने ",
- "sharedCancel": "रद्ध गर्ने ",
- "sharedAdd": "थप्ने",
- "sharedEdit": "सच्याउने",
- "sharedRemove": "हटाउने ",
- "sharedRemoveConfirm": "हटाउने हो?",
- "sharedKm": "कि मि ",
- "sharedMi": "माइल",
- "sharedKn": "kn",
- "sharedKmh": "कि मि /घण्टा ",
- "sharedMph": "माइल /घण्टा ",
- "sharedHour": "घण्टा ",
- "sharedMinute": "मिनेट ",
- "sharedSecond": "सेकेन्ड ",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "त्रुटी",
- "errorUnknown": "अज्ञात त्रुटी ",
- "errorConnection": "जडान मा त्रुटी भयो ",
- "userEmail": "इ मेल ",
- "userPassword": "गोप्य शब्द ",
- "userAdmin": "ब्यबस्थापक",
- "userRemember": "Remember",
- "loginTitle": "लगिन गर्ने ",
- "loginLanguage": "भाषा ",
- "loginRegister": "दर्ता गर्ने",
- "loginLogin": "भित्रिने ",
- "loginFailed": "इ मेल वा गोप्य शब्द गलत भयो ",
- "loginCreated": "नया प्रयोगकर्ता दर्ता भयो ",
- "loginLogout": "बाहिरिने ",
- "devicesAndState": "यन्त्रहरू तथा अवस्था ",
- "deviceDialog": "यन्त्र",
- "deviceTitle": "यन्त्रहरू ",
- "deviceIdentifier": "परिचायक ",
- "deviceLastUpdate": "अन्तिम अपडेट ",
- "deviceCommand": "आदेश ",
- "deviceFollow": "पिछा गर्ने ",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "सेटिंग ",
- "settingsUser": "खाता ",
- "settingsGroups": "Groups",
- "settingsServer": "सर्भर ",
- "settingsUsers": "प्रयोगकर्ताहरु ",
- "settingsDistanceUnit": "दुरी ",
- "settingsSpeedUnit": "गति ",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "प्रतिबेदनहरु ",
- "reportDevice": "यन्त्र ",
- "reportFrom": "बाट ",
- "reportTo": "सम्म ",
- "reportShow": "देखाउने ",
- "reportClear": "सफा गर्ने ",
- "positionFixTime": "समय ",
- "positionValid": "ठिक",
- "positionLatitude": "अक्षांश",
- "positionLongitude": "देशान्तर ",
- "positionAltitude": "उचाई ",
- "positionSpeed": "गति ",
- "positionCourse": "दिशा ",
- "positionAddress": "ठेगाना ",
- "positionProtocol": "प्रोटोकल ",
- "serverTitle": "सर्भर सेटिंग",
- "serverZoom": "ठुलो बनाउने ",
- "serverRegistration": "दर्ता ",
- "serverReadonly": "पढ्ने मात्रै ",
- "mapTitle": "नक्शा ",
- "mapLayer": "नक्शा को तह ",
- "mapCustom": "अनुकुल नक्शा ",
- "mapOsm": "ओपन स्ट्रिट नक्शा ",
- "mapBingKey": "बिंग नक्शाको चाबी (कि) ",
- "mapBingRoad": "बिंग नक्शा (सडक)",
- "mapBingAerial": "बिंग नक्शा (एरियल)",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "अवस्था ",
- "stateName": "गुण ",
- "stateValue": "मूल्य ",
- "commandTitle": "आदेश ",
- "commandSend": "पठाउने ",
- "commandType": "प्रकार ",
- "commandSent": "आदेश पठाईएको छ ",
- "commandPositionPeriodic": "आवधिक प्रतिबेदन ",
- "commandPositionStop": "प्रतिबेदन बन्द गर्ने ",
- "commandEngineStop": "इन्जिन बन्द गर्ने ",
- "commandEngineResume": "इन्जिन खोल्ने ",
- "commandFrequency": "आव्रती ",
- "commandUnit": "इकाई ",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/nl.json b/web/l10n/nl.json
deleted file mode 100644
index 85e2071ff..000000000
--- a/web/l10n/nl.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Laden...",
- "sharedSave": "Bewaren",
- "sharedCancel": "Annuleren",
- "sharedAdd": "Toevoegen",
- "sharedEdit": "Bewerken",
- "sharedRemove": "Verwijderen",
- "sharedRemoveConfirm": "Item Verwijderen?",
- "sharedKm": "km",
- "sharedMi": "mijlen",
- "sharedKn": "knopen",
- "sharedKmh": "km/h",
- "sharedMph": "mijlen per uur",
- "sharedHour": "Uur",
- "sharedMinute": "Minuut",
- "sharedSecond": "Seconde",
- "sharedName": "Naam",
- "sharedDescription": "Omschrijving",
- "sharedSearch": "Zoeken",
- "sharedGeofence": "Geografisch gebied",
- "sharedGeofences": "Gegrafische gebieden",
- "sharedNotifications": "Melding",
- "sharedAttributes": "Attributen",
- "sharedAttribute": "Attribuut",
- "sharedArea": "Gebied",
- "sharedMute": "Mute",
- "errorTitle": "Fout",
- "errorUnknown": "Onbekende fout",
- "errorConnection": "Verbindingsfout",
- "userEmail": "Email",
- "userPassword": "Wachtwoord",
- "userAdmin": "Administrator",
- "userRemember": "Remember",
- "loginTitle": "Inloggen",
- "loginLanguage": "Taal",
- "loginRegister": "Registreren",
- "loginLogin": "Inloggen",
- "loginFailed": "Onjuiste emailadres of wachtwoord",
- "loginCreated": "Nieuwe gebruiker werd geregistreerd",
- "loginLogout": "Uitloggen",
- "devicesAndState": "Apparaat en Status",
- "deviceDialog": "Apparaat",
- "deviceTitle": "Apparaten",
- "deviceIdentifier": "Identifier",
- "deviceLastUpdate": "Laatste Update",
- "deviceCommand": "Commando",
- "deviceFollow": "Volg",
- "groupDialog": "Groep",
- "groupParent": "Groep",
- "groupNoGroup": "Geen groep",
- "settingsTitle": "Instellingen",
- "settingsUser": "Account",
- "settingsGroups": "Groepen",
- "settingsServer": "Server",
- "settingsUsers": "Gebruikers",
- "settingsDistanceUnit": "Afstand",
- "settingsSpeedUnit": "Snelheid",
- "settingsTwelveHourFormat": "12-uur indeling",
- "reportTitle": "Rapportages",
- "reportDevice": "Apparaat",
- "reportFrom": "Van",
- "reportTo": "Naar",
- "reportShow": "Laat zien",
- "reportClear": "Leegmaken",
- "positionFixTime": "Tijd",
- "positionValid": "Geldig",
- "positionLatitude": "Breedtegraad",
- "positionLongitude": "Lengtegraad",
- "positionAltitude": "hoogte",
- "positionSpeed": "Snelheid",
- "positionCourse": "Koers",
- "positionAddress": "Adres",
- "positionProtocol": "Protocol",
- "serverTitle": "Server Instellingen",
- "serverZoom": "Zoom",
- "serverRegistration": "Registratie",
- "serverReadonly": "Alleen lezen",
- "mapTitle": "Kaart",
- "mapLayer": "Kaart laag",
- "mapCustom": "Aangepaste Map",
- "mapOsm": "OpenStreetMap",
- "mapBingKey": "Bing Maps sleutel",
- "mapBingRoad": "Bing Maps Wegen",
- "mapBingAerial": "Bing Maps Luchtfoto",
- "mapShapePolygon": "Polygoon",
- "mapShapeCircle": "Cirkel",
- "stateTitle": "Status",
- "stateName": "Parameter",
- "stateValue": "Waarde",
- "commandTitle": "Commando",
- "commandSend": "Verstuur",
- "commandType": "Type",
- "commandSent": "Commando Verstuurd",
- "commandPositionPeriodic": "Periodiek Rapporteren",
- "commandPositionStop": "Stop Rapporteren",
- "commandEngineStop": "Motor Stoppen",
- "commandEngineResume": "Motor Hervatten",
- "commandFrequency": "Frequentie",
- "commandUnit": "Eenheid",
- "commandCustom": "Custom commando",
- "commandPositionSingle": "Enkel commando",
- "commandAlarmArm": "Schakel alarm in",
- "commandAlarmDisarm": "Schakel alarm uit",
- "commandSetTimezone": "Stel tijdzone in",
- "commandRequestPhoto": "Vraag foto",
- "commandRebootDevice": "Herstart apparaat",
- "commandSendSms": "Stuur SMS",
- "commandSosNumber": "Bewerk SOS nummer in",
- "commandSilenceTime": "Bewerk stille tijd",
- "commandSetPhonebook": "Bewerk telefoonboek",
- "commandVoiceMessage": "Spraak bericht",
- "commandOutputControl": "Output control",
- "commandAlarmSpeed": "Hoge snelheid alarm",
- "commandDeviceIdentification": "Apparaat indentificeren",
- "eventDeviceOnline": "Apparaat is online",
- "eventDeviceOffline": "Apparaat is offline",
- "eventDeviceMoving": "Apparaat beweegt",
- "eventDeviceStopped": "Apparaat is gestopt",
- "eventDeviceOverspeed": "Apparaat overschrijdt snelheid",
- "eventCommandResult": "Commando resultaat",
- "eventGeofenceEnter": "Appraat is binnen geografisch gebied",
- "eventGeofenceExit": "Apparaat verlaat geografisch gebied",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type notificatie",
- "notificationWeb": "Stuur via web",
- "notificationMail": "Stuur via mail"
-} \ No newline at end of file
diff --git a/web/l10n/nn.json b/web/l10n/nn.json
deleted file mode 100644
index c79ed1546..000000000
--- a/web/l10n/nn.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Lastar...",
- "sharedSave": "Lagre",
- "sharedCancel": "Avbryt",
- "sharedAdd": "Legg til",
- "sharedEdit": "Endre",
- "sharedRemove": "Fjern",
- "sharedRemoveConfirm": "Fjern element?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/t",
- "sharedMph": "mph",
- "sharedHour": "Time",
- "sharedMinute": "Minutt",
- "sharedSecond": "Sekund",
- "sharedName": "Namn",
- "sharedDescription": "Beskriving",
- "sharedSearch": "Søk",
- "sharedGeofence": "Geo-gjerde",
- "sharedGeofences": "Geo-gjerde",
- "sharedNotifications": "Varsel",
- "sharedAttributes": "Eigenskapar",
- "sharedAttribute": "Eigenskap",
- "sharedArea": "Område",
- "sharedMute": "Mute",
- "errorTitle": "Feil",
- "errorUnknown": "Ukjent feil",
- "errorConnection": "Forbindelse feila",
- "userEmail": "E-post",
- "userPassword": "Passord",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Logg inn",
- "loginLanguage": "Språk",
- "loginRegister": "Registrer",
- "loginLogin": "Logg inn",
- "loginFailed": "Feil e-post eller passord",
- "loginCreated": "Ny brukar har blitt registrert",
- "loginLogout": "Logg ut",
- "devicesAndState": "Einingar og status",
- "deviceDialog": "Eining",
- "deviceTitle": "Einingar",
- "deviceIdentifier": "Identifikator",
- "deviceLastUpdate": "Sist oppdatert",
- "deviceCommand": "Kommando",
- "deviceFollow": "Følj",
- "groupDialog": "Gruppe",
- "groupParent": "Gruppe",
- "groupNoGroup": "Inga gruppe",
- "settingsTitle": "Innstillingar",
- "settingsUser": "Konto",
- "settingsGroups": "Gruppar",
- "settingsServer": "Tenar",
- "settingsUsers": "Brukarar",
- "settingsDistanceUnit": "Avstand",
- "settingsSpeedUnit": "Hastigheit",
- "settingsTwelveHourFormat": "Tolvtimersformat",
- "reportTitle": "Rapportar",
- "reportDevice": "Eining",
- "reportFrom": "Frå",
- "reportTo": "Til",
- "reportShow": "Syn",
- "reportClear": "Nullstill",
- "positionFixTime": "Tid",
- "positionValid": "Gyldig",
- "positionLatitude": "Breddegrad",
- "positionLongitude": "Lengdegrad",
- "positionAltitude": "Høgde",
- "positionSpeed": "Hastigheit",
- "positionCourse": "Retning",
- "positionAddress": "Adresse",
- "positionProtocol": "Protokoll",
- "serverTitle": "Tenarinnstillingar",
- "serverZoom": "Zoom",
- "serverRegistration": "Registering",
- "serverReadonly": "Skrivebeskytta",
- "mapTitle": "Kart",
- "mapLayer": "Kartlag",
- "mapCustom": "Eigedefinert kart",
- "mapOsm": "Open Street-kart",
- "mapBingKey": "Bing Maps-nøkkel",
- "mapBingRoad": "Bing Maps-veg",
- "mapBingAerial": "Bing Maps-flyfoto",
- "mapShapePolygon": "Mangekant",
- "mapShapeCircle": "Sirkel",
- "stateTitle": "Status",
- "stateName": "Eigenskap",
- "stateValue": "Verdi",
- "commandTitle": "Kommando",
- "commandSend": "Send",
- "commandType": "Type",
- "commandSent": "Kommando har blitt send",
- "commandPositionPeriodic": "Periodisk rapportering",
- "commandPositionStop": "Stopp rapportering",
- "commandEngineStop": "Stopp motor",
- "commandEngineResume": "Fortsett motor",
- "commandFrequency": "Frekvens",
- "commandUnit": "Eining",
- "commandCustom": "Eigendefinert kommando",
- "commandPositionSingle": "Enkel-rapportering",
- "commandAlarmArm": "Slå alarm på",
- "commandAlarmDisarm": "Slå alarm av",
- "commandSetTimezone": "Sett opp tidssone",
- "commandRequestPhoto": "Be om foto",
- "commandRebootDevice": "Omstart eining",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SMS-nummer",
- "commandSilenceTime": "Sett stilletid",
- "commandSetPhonebook": "Sett telefonkatalog",
- "commandVoiceMessage": "Talemelding",
- "commandOutputControl": "Utgangkontroll",
- "commandAlarmSpeed": "Fartsgrensealarm",
- "commandDeviceIdentification": "Einingsidentifikasjon",
- "eventDeviceOnline": "Eining er tilkopla",
- "eventDeviceOffline": "Eininga er fråkopla",
- "eventDeviceMoving": "Eininga rører seg",
- "eventDeviceStopped": "Eininga er stoppa",
- "eventDeviceOverspeed": "Eininga bryt fartsgrensa",
- "eventCommandResult": "Kommandoresultat",
- "eventGeofenceEnter": "Eininga har komme inn i geo-gjerde",
- "eventGeofenceExit": "Eininga har forlatt geo-gjerde",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Varseltype",
- "notificationWeb": "Send via web",
- "notificationMail": "Send via e-post"
-} \ No newline at end of file
diff --git a/web/l10n/pl.json b/web/l10n/pl.json
deleted file mode 100644
index 742103c4f..000000000
--- a/web/l10n/pl.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Wczytywanie...",
- "sharedSave": "Zapisz",
- "sharedCancel": "Anuluj",
- "sharedAdd": "Dodaj",
- "sharedEdit": "Edytuj",
- "sharedRemove": "Usuń",
- "sharedRemoveConfirm": "Usuń obiekt?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Godzina",
- "sharedMinute": "Minuta",
- "sharedSecond": "Sekunda",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Bląd",
- "errorUnknown": "Nieznany błąd",
- "errorConnection": "Błąd przy połączeniu",
- "userEmail": "Email",
- "userPassword": "Hasło",
- "userAdmin": "Administrator",
- "userRemember": "Remember",
- "loginTitle": "Logowanie",
- "loginLanguage": "Język",
- "loginRegister": "Rejestracja",
- "loginLogin": "Zaloguj",
- "loginFailed": "Nieprawidłowy adres e-mail lub hasło",
- "loginCreated": "Nowy użytkownik został zarejestrowany",
- "loginLogout": "Wyloguj",
- "devicesAndState": "Devices and State",
- "deviceDialog": "Urządzenie",
- "deviceTitle": "Urządzenia",
- "deviceIdentifier": "Identyfikator",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Zdarzenie",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Ustawienia",
- "settingsUser": "Konto",
- "settingsGroups": "Groups",
- "settingsServer": "Serwer",
- "settingsUsers": "Użytkownicy",
- "settingsDistanceUnit": "Dystans",
- "settingsSpeedUnit": "Prędkość",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Raporty",
- "reportDevice": "Urządzenie",
- "reportFrom": "Z",
- "reportTo": "Do",
- "reportShow": "Wczytaj",
- "reportClear": "Wyczyść",
- "positionFixTime": "Czas",
- "positionValid": "Aktywny",
- "positionLatitude": "Szerokość",
- "positionLongitude": "Długość",
- "positionAltitude": "Wysokość",
- "positionSpeed": "Prędkość",
- "positionCourse": "Kurs",
- "positionAddress": "Adres",
- "positionProtocol": "Protokół",
- "serverTitle": "Ustawienia serwera",
- "serverZoom": "Powiększenie",
- "serverRegistration": "Rejestracja",
- "serverReadonly": "Readonly",
- "mapTitle": "Mapa",
- "mapLayer": "Mapa",
- "mapCustom": "Własna mapa",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Lokalizacja",
- "stateName": "Właściwości",
- "stateValue": "Wartość",
- "commandTitle": "Zdarzenie",
- "commandSend": "Wyślij",
- "commandType": "Typ",
- "commandSent": "Komenda została wysłana",
- "commandPositionPeriodic": "Pozycja - Fix",
- "commandPositionStop": "Pozycja - Stop",
- "commandEngineStop": "Silnik - Stop",
- "commandEngineResume": "Silnik - Praca",
- "commandFrequency": "Częstotliwość",
- "commandUnit": "Jednostka",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/pt.json b/web/l10n/pt.json
deleted file mode 100644
index 3492bdc5c..000000000
--- a/web/l10n/pt.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Carregando...",
- "sharedSave": "Salvar",
- "sharedCancel": "Cancelar",
- "sharedAdd": "Adicionar",
- "sharedEdit": "Editar",
- "sharedRemove": "Remover",
- "sharedRemoveConfirm": "Remover item?",
- "sharedKm": "Km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "Km/h",
- "sharedMph": "Mph",
- "sharedHour": "Hora",
- "sharedMinute": "Minuto",
- "sharedSecond": "Segundo",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Erro",
- "errorUnknown": "Erro desconhecido",
- "errorConnection": "Erro de conexão",
- "userEmail": "E-mail",
- "userPassword": "Senha",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Entrar",
- "loginLanguage": "Idioma",
- "loginRegister": "Registrar",
- "loginLogin": "Entrar",
- "loginFailed": "Endereço de e-mail ou senha incorreta",
- "loginCreated": "Novo usuário foi registrado",
- "loginLogout": "Sair",
- "devicesAndState": "Devices and State",
- "deviceDialog": "Dispositivo",
- "deviceTitle": "Devices",
- "deviceIdentifier": "Identificador",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Comando",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Configurações",
- "settingsUser": "Conta",
- "settingsGroups": "Groups",
- "settingsServer": "Servidor",
- "settingsUsers": "Usuário",
- "settingsDistanceUnit": "Distância",
- "settingsSpeedUnit": "Velocidade",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Relatórios",
- "reportDevice": "Dispositivo",
- "reportFrom": "De",
- "reportTo": "Para",
- "reportShow": "Mostrar",
- "reportClear": "Limpar",
- "positionFixTime": "Tempo",
- "positionValid": "Válido",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "Velocidade",
- "positionCourse": "Curso",
- "positionAddress": "Endereço",
- "positionProtocol": "protocolo",
- "serverTitle": "Configurações do Servidor",
- "serverZoom": "Zoom",
- "serverRegistration": "Registro",
- "serverReadonly": "Readonly",
- "mapTitle": "Mapa",
- "mapLayer": "Camada Mapa",
- "mapCustom": "Mapa personalizado",
- "mapOsm": "Open Street Mapa",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Mapas Estrada",
- "mapBingAerial": "Bing Mapas Aérea",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Estado",
- "stateName": "Parâmetro",
- "stateValue": "Valor",
- "commandTitle": "Comando",
- "commandSend": "Enviar",
- "commandType": "Tipo",
- "commandSent": "Comando foi enviado",
- "commandPositionPeriodic": "Posição Tempo",
- "commandPositionStop": "Parar Posição",
- "commandEngineStop": "Bloqueio Veículo",
- "commandEngineResume": "Desbloqueio Veículo",
- "commandFrequency": "Frequência",
- "commandUnit": "Unidade",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/pt_BR.json b/web/l10n/pt_BR.json
deleted file mode 100644
index 9d613dd1c..000000000
--- a/web/l10n/pt_BR.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Carregando...",
- "sharedSave": "Gravar",
- "sharedCancel": "Cancelar",
- "sharedAdd": "Adicionar",
- "sharedEdit": "Editar",
- "sharedRemove": "Remover",
- "sharedRemoveConfirm": "Remover item?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Hora",
- "sharedMinute": "Minuto",
- "sharedSecond": "Segundo",
- "sharedName": "Nome",
- "sharedDescription": "Descrição",
- "sharedSearch": "Busca",
- "sharedGeofence": "Geocerca",
- "sharedGeofences": "Geocercas",
- "sharedNotifications": "Notificações",
- "sharedAttributes": "Atributos",
- "sharedAttribute": "Atributo",
- "sharedArea": "Área",
- "sharedMute": "Mudo",
- "errorTitle": "Erro",
- "errorUnknown": "Erro desconhecido",
- "errorConnection": "Erro de conexão",
- "userEmail": "Email",
- "userPassword": "Senha",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Entrar",
- "loginLanguage": "Idioma",
- "loginRegister": "Registrar",
- "loginLogin": "Entrar",
- "loginFailed": "Endereço de email ou senha incorretos",
- "loginCreated": "O novo usuário foi registrado",
- "loginLogout": "Sair",
- "devicesAndState": "Dispositivo e Estado",
- "deviceDialog": "Dispositivo",
- "deviceTitle": "Dispositivos",
- "deviceIdentifier": "Identificador",
- "deviceLastUpdate": "Última Atualização",
- "deviceCommand": "Comando",
- "deviceFollow": "Seguir",
- "groupDialog": "Grupo",
- "groupParent": "Grupo",
- "groupNoGroup": "Sem Grupo",
- "settingsTitle": "Configurações",
- "settingsUser": "Conta",
- "settingsGroups": "Grupos",
- "settingsServer": "Servidor",
- "settingsUsers": "Usuários",
- "settingsDistanceUnit": "Distância",
- "settingsSpeedUnit": "Velocidade",
- "settingsTwelveHourFormat": "Formato de 12 Horas",
- "reportTitle": "Relatórios",
- "reportDevice": "Dispositivo",
- "reportFrom": "De",
- "reportTo": "Para",
- "reportShow": "Mostrar",
- "reportClear": "Limpar",
- "positionFixTime": "Tempo",
- "positionValid": "Válido",
- "positionLatitude": "Latitude",
- "positionLongitude": "Longitude",
- "positionAltitude": "Altitude",
- "positionSpeed": "Velocidade",
- "positionCourse": "Curso",
- "positionAddress": "Endereço",
- "positionProtocol": "Protocolo",
- "serverTitle": "Configurações do Servidor",
- "serverZoom": "Zoom",
- "serverRegistration": "Registro",
- "serverReadonly": "Somente leitura",
- "mapTitle": "Mapa",
- "mapLayer": "Camada de Mapa",
- "mapCustom": "Mapa Personalizado",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Estradas",
- "mapBingAerial": "Bing Maps Aéreo",
- "mapShapePolygon": "Polígono",
- "mapShapeCircle": "Círculo",
- "stateTitle": "Estado",
- "stateName": "Atributo",
- "stateValue": "Valor",
- "commandTitle": "Comando",
- "commandSend": "Enviar",
- "commandType": "Tipo",
- "commandSent": "Comando foi enviado",
- "commandPositionPeriodic": "Atualização Periódica",
- "commandPositionStop": "Parar Atualizaçao",
- "commandEngineStop": "Desligar Motor",
- "commandEngineResume": "Religar Motor",
- "commandFrequency": "Frequencia",
- "commandUnit": "Unidade",
- "commandCustom": "Comando personalizado",
- "commandPositionSingle": "Relatório único",
- "commandAlarmArm": "Ativar Alarme",
- "commandAlarmDisarm": "Desativar Alarme",
- "commandSetTimezone": "Definir fuso horário",
- "commandRequestPhoto": "Pegar foto",
- "commandRebootDevice": "Reiniciar dispositivo",
- "commandSendSms": "Enviar SMS",
- "commandSosNumber": "Definir numero SOS",
- "commandSilenceTime": "Silencioso",
- "commandSetPhonebook": "Definir lista telefônica",
- "commandVoiceMessage": "Mensagem de voz",
- "commandOutputControl": "Controle de saída",
- "commandAlarmSpeed": "Alarme de excesso de velocidade",
- "commandDeviceIdentification": "Identificação do dispositivo",
- "eventDeviceOnline": "Dispositivo está on-line",
- "eventDeviceOffline": "Dispositivo está offline",
- "eventDeviceMoving": "Dispositivo está se movendo",
- "eventDeviceStopped": "Dispositivo está parado",
- "eventDeviceOverspeed": "Dispositivo excede a velocidade",
- "eventCommandResult": "Resultado do comando",
- "eventGeofenceEnter": "Dispositivo entrou geocerca",
- "eventGeofenceExit": "Dispositivo saiu geocerca",
- "eventAlarm": "Alarmes",
- "alarm": "Alarme",
- "alarmSos": "Alarme SOS",
- "alarmVibration": "Alarme de Vibração",
- "alarmMovement": "Alarme de Movimento",
- "alarmOverspeed": "Alarme de Alta Velocidade",
- "alarmFallDown": "Alarme de Queda",
- "alarmLowBattery": "Alarme de Bateria Fraca",
- "alarmMotion": "Alarme de Movimento",
- "alarmFault": "Alarme de Problema",
- "notificationType": "Tipo de Notificação",
- "notificationWeb": "Enviar via Web",
- "notificationMail": "Enviar via Email"
-} \ No newline at end of file
diff --git a/web/l10n/ro.json b/web/l10n/ro.json
deleted file mode 100644
index 950eb2845..000000000
--- a/web/l10n/ro.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Se încarcă",
- "sharedSave": "Salvează",
- "sharedCancel": "Anulează",
- "sharedAdd": "Adaugă",
- "sharedEdit": "Modifică",
- "sharedRemove": "Elimină",
- "sharedRemoveConfirm": "Ștergeți obiectul?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Oră",
- "sharedMinute": "Minut",
- "sharedSecond": "Secundă",
- "sharedName": "Nume",
- "sharedDescription": "Descriere",
- "sharedSearch": "Căutare",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notificările",
- "sharedAttributes": "Atribute",
- "sharedAttribute": "Atribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Eroare",
- "errorUnknown": "Eroare necunoscută",
- "errorConnection": "Eroare de conexiune",
- "userEmail": "Email",
- "userPassword": "Parolă",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Autentificare",
- "loginLanguage": "Limbă",
- "loginRegister": "Înregistrare",
- "loginLogin": "Intră în cont",
- "loginFailed": "E-mail sau parolă incorectă",
- "loginCreated": "Un utilizator nou a fost înregistrat",
- "loginLogout": "Deconectare",
- "devicesAndState": "Stare dispozitive",
- "deviceDialog": "Dispozitiv",
- "deviceTitle": "Dispozitive",
- "deviceIdentifier": "Identificator",
- "deviceLastUpdate": "Ultima actualizare",
- "deviceCommand": "Comandă",
- "deviceFollow": "Urmareste",
- "groupDialog": "Grup",
- "groupParent": "Grup",
- "groupNoGroup": "Nici-un grup",
- "settingsTitle": "Setări",
- "settingsUser": "Cont",
- "settingsGroups": "Grupuri",
- "settingsServer": "Server",
- "settingsUsers": "Utilizatori",
- "settingsDistanceUnit": "Distanţă",
- "settingsSpeedUnit": "Viteză",
- "settingsTwelveHourFormat": "12-oră",
- "reportTitle": "Rapoarte",
- "reportDevice": "Dispozitiv",
- "reportFrom": "De la ",
- "reportTo": "Până la",
- "reportShow": "Arată",
- "reportClear": "Sterge",
- "positionFixTime": "Timp",
- "positionValid": "Valabil",
- "positionLatitude": "Latitudine",
- "positionLongitude": "Longitudine",
- "positionAltitude": "Altitudine",
- "positionSpeed": "Viteză",
- "positionCourse": "Curs",
- "positionAddress": "Adresă",
- "positionProtocol": "Protocol",
- "serverTitle": "Setări server",
- "serverZoom": "Zoom",
- "serverRegistration": "Înregistrare",
- "serverReadonly": "Doar citire",
- "mapTitle": "Hartă",
- "mapLayer": "Strat Hartă",
- "mapCustom": "Personalizare Hartă",
- "mapOsm": "Hartă Open Street",
- "mapBingKey": "Cheie Hărți Bing",
- "mapBingRoad": "Bing Hartă Drumuri",
- "mapBingAerial": "Bing Hartă Aeriană",
- "mapShapePolygon": "Poligon",
- "mapShapeCircle": "Cerc",
- "stateTitle": "Stare",
- "stateName": "Atribut",
- "stateValue": "Valoare",
- "commandTitle": "Comandă",
- "commandSend": "Trimite",
- "commandType": "Tip",
- "commandSent": "Comandă a fost trimisa",
- "commandPositionPeriodic": "Raportarea Periodică",
- "commandPositionStop": "Oprire Raportare",
- "commandEngineStop": "Blocare Motor",
- "commandEngineResume": "Deblocare Motor",
- "commandFrequency": "Frecvenţă",
- "commandUnit": "Unitate",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Trimite SMS",
- "commandSosNumber": "Set număr SOS",
- "commandSilenceTime": "Set Timp Silențios",
- "commandSetPhonebook": "Set Agendă telefonică",
- "commandVoiceMessage": "Vesaj Vocal",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/ru.json b/web/l10n/ru.json
deleted file mode 100644
index 412443f15..000000000
--- a/web/l10n/ru.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Загрузка...",
- "sharedSave": "Сохранить",
- "sharedCancel": "Отмена",
- "sharedAdd": "Добавить",
- "sharedEdit": "Редактировать",
- "sharedRemove": "Удалить",
- "sharedRemoveConfirm": "Удалить элемент?",
- "sharedKm": "км",
- "sharedMi": "мили",
- "sharedKn": "уз",
- "sharedKmh": "км/ч",
- "sharedMph": "миль/ч",
- "sharedHour": "Часы",
- "sharedMinute": "Минуты",
- "sharedSecond": "Секунды",
- "sharedName": "Имя",
- "sharedDescription": "Описание",
- "sharedSearch": "Поиск",
- "sharedGeofence": "Геозона",
- "sharedGeofences": "Геозоны",
- "sharedNotifications": "Уведомления",
- "sharedAttributes": "Атрибуты",
- "sharedAttribute": "Атрибут",
- "sharedArea": "Область",
- "sharedMute": "Mute",
- "errorTitle": "Ошибка",
- "errorUnknown": "Неизвестная ошибка",
- "errorConnection": "Ошибка соединения",
- "userEmail": "Email",
- "userPassword": "Пароль",
- "userAdmin": "Администратор",
- "userRemember": "Remember",
- "loginTitle": "Вход",
- "loginLanguage": "Язык",
- "loginRegister": "Регистрация",
- "loginLogin": "Вход",
- "loginFailed": "Неправильный email адрес или пароль",
- "loginCreated": "Новый пользователь зарегистрирован",
- "loginLogout": "Выход",
- "devicesAndState": "Устройства и Состояния",
- "deviceDialog": "Устройство",
- "deviceTitle": "Устройства",
- "deviceIdentifier": "Идентификатор",
- "deviceLastUpdate": "Последнее Обновление",
- "deviceCommand": "Команда",
- "deviceFollow": "Следовать",
- "groupDialog": "Группа",
- "groupParent": "Группа",
- "groupNoGroup": "Без Группы",
- "settingsTitle": "Настройки",
- "settingsUser": "Аккаунт",
- "settingsGroups": "Группы",
- "settingsServer": "Сервер",
- "settingsUsers": "Пользователи",
- "settingsDistanceUnit": "Расстояние",
- "settingsSpeedUnit": "Скорость",
- "settingsTwelveHourFormat": "12-часовой формат",
- "reportTitle": "Отчеты",
- "reportDevice": "Устройство",
- "reportFrom": "С",
- "reportTo": "По",
- "reportShow": "Показать",
- "reportClear": "Очистить",
- "positionFixTime": "Время",
- "positionValid": "Корректность",
- "positionLatitude": "Широта",
- "positionLongitude": "Долгота",
- "positionAltitude": "Высота",
- "positionSpeed": "Скорость",
- "positionCourse": "Курс",
- "positionAddress": "Адрес",
- "positionProtocol": "Протокол",
- "serverTitle": "Настройки Сервера",
- "serverZoom": "Приближение",
- "serverRegistration": "Регистрация",
- "serverReadonly": "Только Просмотр",
- "mapTitle": "Карта",
- "mapLayer": "Слой Карты",
- "mapCustom": "Пользовательская карта",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Ключ Bing Maps",
- "mapBingRoad": "Bing Maps Дороги",
- "mapBingAerial": "Bing Maps Спутник",
- "mapShapePolygon": "Многоугольник",
- "mapShapeCircle": "Круг",
- "stateTitle": "Состояние",
- "stateName": "Параметр",
- "stateValue": "Значение",
- "commandTitle": "Команда",
- "commandSend": "Отправить",
- "commandType": "Тип",
- "commandSent": "Команда отправлена",
- "commandPositionPeriodic": "Начать Отслеживание",
- "commandPositionStop": "Отменить Отслеживание",
- "commandEngineStop": "Заблокировать Двигатель",
- "commandEngineResume": "Разблокировать Двигатель",
- "commandFrequency": "Частота",
- "commandUnit": "Единицы",
- "commandCustom": "Пользовательская команда",
- "commandPositionSingle": "Разовое Отслеживание",
- "commandAlarmArm": "Активировать Сигнализацию",
- "commandAlarmDisarm": "Деактивировать Сигнализацию",
- "commandSetTimezone": "Настроить Часовой пояс",
- "commandRequestPhoto": "Запросить Фото",
- "commandRebootDevice": "Перезагрузить Устройство",
- "commandSendSms": "Отправить СМС",
- "commandSosNumber": "Настроить Экстренный Номер",
- "commandSilenceTime": "Настроить Время Тишины",
- "commandSetPhonebook": "Настроить Телефонную книгу",
- "commandVoiceMessage": "Голосовое Сообщение",
- "commandOutputControl": "Контроль Выхода",
- "commandAlarmSpeed": "Превышение Скорости",
- "commandDeviceIdentification": "Идентификация Устройства",
- "eventDeviceOnline": "Устройство в сети",
- "eventDeviceOffline": "Устройство не в сети",
- "eventDeviceMoving": "Устройство движется",
- "eventDeviceStopped": "Устройство остановилось",
- "eventDeviceOverspeed": "Устройство превышает скорость",
- "eventCommandResult": "Результат команды",
- "eventGeofenceEnter": "Устройство вошло в геозону",
- "eventGeofenceExit": "Устройство покинуло геозону",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Тип уведомления",
- "notificationWeb": "Отправлять через Веб",
- "notificationMail": "Отправлять через Почту"
-} \ No newline at end of file
diff --git a/web/l10n/si.json b/web/l10n/si.json
deleted file mode 100644
index 8a76ca968..000000000
--- a/web/l10n/si.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "පූරණය කරමින් ...",
- "sharedSave": "සුරකින්න",
- "sharedCancel": "අවලංගු කරන්න",
- "sharedAdd": "එක් කරන්න",
- "sharedEdit": "සංස්කරණය කරන්න",
- "sharedRemove": "ඉවත් කරන්න",
- "sharedRemoveConfirm": "අයිතමය ඉවත් කරන්න ද?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "පැය",
- "sharedMinute": "මිනිත්තු",
- "sharedSecond": "තත්පර",
- "sharedName": "නම",
- "sharedDescription": "විස්තරය",
- "sharedSearch": "සොයන්න",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "නිවේදන",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "ප්‍රදේශය",
- "sharedMute": "Mute",
- "errorTitle": "දෝෂයක් ",
- "errorUnknown": "නොදන්නා දෝෂයක් !",
- "errorConnection": "සම්බන්ධතා දෝෂයක් !",
- "userEmail": "විද්යුත් තැපෑල",
- "userPassword": "මුරපදය",
- "userAdmin": "පරිපාලක",
- "userRemember": "Remember",
- "loginTitle": "පිවිසුම් ගිණුම",
- "loginLanguage": "භාෂාව",
- "loginRegister": "ලියාපදිංචි කරන්න",
- "loginLogin": "පිවිසුම",
- "loginFailed": "ඊ-මේල් ලිපිනය හෝ මුරපදය වැරදිය !",
- "loginCreated": "නව පරිශීලක ලියාපදිංචි කරන ලදි !",
- "loginLogout": "ඉවත්වන්න",
- "devicesAndState": "උපාංග සහ ස්වභාවය",
- "deviceDialog": "උපාංගය",
- "deviceTitle": "උපාංග",
- "deviceIdentifier": "හඳුනාගැනීමේ කේතය",
- "deviceLastUpdate": "අවසන් යාවත්කාලීනය",
- "deviceCommand": "විධානය",
- "deviceFollow": "Follow",
- "groupDialog": "සමූහය",
- "groupParent": "සමූහය",
- "groupNoGroup": "සමූහ එපා",
- "settingsTitle": "සැකසුම්",
- "settingsUser": "ගිණුම",
- "settingsGroups": "සමූහ",
- "settingsServer": "සේවාදායකය",
- "settingsUsers": "පරිශීලකයන්",
- "settingsDistanceUnit": "දුර",
- "settingsSpeedUnit": "වේගය",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "වාර්තා",
- "reportDevice": "උපාංගය",
- "reportFrom": "සිට",
- "reportTo": "දක්වා",
- "reportShow": "පෙන්වන්න",
- "reportClear": "ඉවත් කරන්න",
- "positionFixTime": "කාලය",
- "positionValid": "වලංගු",
- "positionLatitude": "අක්ෂාංශ",
- "positionLongitude": "දේශාංශ",
- "positionAltitude": "උන්නතාංශය",
- "positionSpeed": "වේගය",
- "positionCourse": "දිගංශය",
- "positionAddress": "ලිපිනය",
- "positionProtocol": "ප්රොටොකෝලය",
- "serverTitle": "සේවාදායකයේ සැකසුම්",
- "serverZoom": "විශාලනය",
- "serverRegistration": "ලියාපදිංචි කිරීම",
- "serverReadonly": "Readonly",
- "mapTitle": "සිතියම",
- "mapLayer": "සිතියම් ස්තරය",
- "mapCustom": "අභිරුචි සිතියම",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "බහුඅශ්‍රය",
- "mapShapeCircle": "වෘත්තය",
- "stateTitle": "තත්වය",
- "stateName": "පරාමිතිය",
- "stateValue": "අගය",
- "commandTitle": "විධානය",
- "commandSend": "යවන්න",
- "commandType": "වර්ගය",
- "commandSent": "විධානය යවා ඇත",
- "commandPositionPeriodic": "ආවර්තිතව වාර්තා කරන්න",
- "commandPositionStop": "වාර්තා කිරීම නවත්වන්න",
- "commandEngineStop": "එන්ජිම නවත්වන්න",
- "commandEngineResume": "එන්ජිම නැවත ආරම්භ කරන්න",
- "commandFrequency": "සංඛ්යාතය",
- "commandUnit": "ඒකකය",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/sk.json b/web/l10n/sk.json
deleted file mode 100644
index 6d36c3dd6..000000000
--- a/web/l10n/sk.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Načítava...",
- "sharedSave": "Uložiť",
- "sharedCancel": "Zrušiť",
- "sharedAdd": "Pridať",
- "sharedEdit": "Upraviť",
- "sharedRemove": "Odstrániť",
- "sharedRemoveConfirm": "Odstrániť položku?",
- "sharedKm": "Km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "Km/h",
- "sharedMph": "mph",
- "sharedHour": "Hodina",
- "sharedMinute": "Minúta",
- "sharedSecond": "Sekunda",
- "sharedName": "Meno",
- "sharedDescription": "Popis",
- "sharedSearch": "Hľadať",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifikácie",
- "sharedAttributes": "Atribúty",
- "sharedAttribute": "Atribút",
- "sharedArea": "Oblasť",
- "sharedMute": "Mute",
- "errorTitle": "Chyba",
- "errorUnknown": "Neznáma chyba",
- "errorConnection": "Chyba pripojenia",
- "userEmail": "E-mail",
- "userPassword": "Heslo",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Prihlásenie",
- "loginLanguage": "Jazyk",
- "loginRegister": "Registrovať",
- "loginLogin": "Prihlásenie",
- "loginFailed": "Nesprávna e-mailová adresa alebo heslo",
- "loginCreated": "Nový užívateľ sa zaregistroval",
- "loginLogout": "Odhlásiť",
- "devicesAndState": "Zariadenia a Status",
- "deviceDialog": "Zariadenie",
- "deviceTitle": "Zariadena",
- "deviceIdentifier": "Identifikátor",
- "deviceLastUpdate": "Posledný update",
- "deviceCommand": "Príkaz",
- "deviceFollow": "Nasleduj",
- "groupDialog": "Skupina",
- "groupParent": "Skupina",
- "groupNoGroup": "Žiadna skupina",
- "settingsTitle": "Nastavenia",
- "settingsUser": "Účet",
- "settingsGroups": "Skupiny",
- "settingsServer": "Server",
- "settingsUsers": "Užívatelia",
- "settingsDistanceUnit": "Vzdialenosť",
- "settingsSpeedUnit": "Rýchlosť jazdy",
- "settingsTwelveHourFormat": "12-hodinový formát",
- "reportTitle": "Správy",
- "reportDevice": "Zariadenie",
- "reportFrom": "Od",
- "reportTo": "Do",
- "reportShow": "Zobraziť",
- "reportClear": "Vyčistiť",
- "positionFixTime": "Čas",
- "positionValid": "Platný",
- "positionLatitude": "Šírka",
- "positionLongitude": "Dĺžka",
- "positionAltitude": "Výška",
- "positionSpeed": "Rýchlosť jazdy",
- "positionCourse": "Kurz",
- "positionAddress": "Adresa",
- "positionProtocol": "Protokol",
- "serverTitle": "Nastavenie servera",
- "serverZoom": "Zoom",
- "serverRegistration": "Registrácia",
- "serverReadonly": "Iba na čítanie",
- "mapTitle": "Mapa",
- "mapLayer": "Mapové vrstvy",
- "mapCustom": "Vlastná mapa",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Klúč Bing Maps",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Arial",
- "mapShapePolygon": "Polygón",
- "mapShapeCircle": "Kruh",
- "stateTitle": "Štát",
- "stateName": "Parameter",
- "stateValue": "Hodnota",
- "commandTitle": "Príkaz",
- "commandSend": "Odoslať",
- "commandType": "Typ",
- "commandSent": "Príkaz bol odoslaný",
- "commandPositionPeriodic": "Pravidelné podávanie správ",
- "commandPositionStop": "Zastavte podávanie správ",
- "commandEngineStop": "Zastavenie motora",
- "commandEngineResume": "Spustenie motora",
- "commandFrequency": "Frekvencia",
- "commandUnit": "Jednotka",
- "commandCustom": "Vlastný príkaz",
- "commandPositionSingle": "Jednoduché podávanie správ",
- "commandAlarmArm": "Nastaviť upozornenie",
- "commandAlarmDisarm": "Zrušiť upozornenie",
- "commandSetTimezone": "Nastaviť časovú zónu",
- "commandRequestPhoto": "Poslať fotku",
- "commandRebootDevice": "Rebootovať zariadenie",
- "commandSendSms": "Postať SMS",
- "commandSosNumber": "Nastaviť čislo SOS",
- "commandSilenceTime": "Nastav tichý čas",
- "commandSetPhonebook": "Nastav telefónny zoznam",
- "commandVoiceMessage": "Hlasové správy",
- "commandOutputControl": "Výstupná kontrola",
- "commandAlarmSpeed": "Upozornenie na prekročenie rýchlosti",
- "commandDeviceIdentification": "Identifikácia zariadenia",
- "eventDeviceOnline": "Zariadenie je online",
- "eventDeviceOffline": "Zariadenie je offline",
- "eventDeviceMoving": "Zariadenie je v pohybe",
- "eventDeviceStopped": "Zariadenie je zastavené",
- "eventDeviceOverspeed": "Zariadenie prekročilo rýchlosť",
- "eventCommandResult": "Výsledok príkazu",
- "eventGeofenceEnter": "Zariadenie vstúpilo geofence zóny",
- "eventGeofenceExit": "Zariadenie opustilo geofence zónu",
- "eventAlarm": "Upozornenia",
- "alarm": "Upozornenie",
- "alarmSos": "SOS upozornenie",
- "alarmVibration": "Vibračné upozornenie",
- "alarmMovement": "Upozornenie pohnutia",
- "alarmOverspeed": "Upozornenie prekročenia rýchlosti ",
- "alarmFallDown": "Upozornenie FallDown ",
- "alarmLowBattery": "Upozornenie LowBattery",
- "alarmMotion": "Upozornenie pohybu",
- "alarmFault": "Upozorneie poruchy",
- "notificationType": "Typ notifikácie",
- "notificationWeb": "Poslať cez Web",
- "notificationMail": "Poslať e-mailom"
-} \ No newline at end of file
diff --git a/web/l10n/sl.json b/web/l10n/sl.json
deleted file mode 100644
index fc5e5e309..000000000
--- a/web/l10n/sl.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Nalagam...",
- "sharedSave": "Shrani",
- "sharedCancel": "Prekini",
- "sharedAdd": "Dodaj",
- "sharedEdit": "Uredi",
- "sharedRemove": "Odstrani",
- "sharedRemoveConfirm": "Odstranim zapis?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Ura",
- "sharedMinute": "Minuta",
- "sharedSecond": "Sekunda",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Napaka",
- "errorUnknown": "Neznana napaka",
- "errorConnection": "Napaka v povezavi",
- "userEmail": "E-Pošta",
- "userPassword": "Geslo",
- "userAdmin": "Admin",
- "userRemember": "Remember",
- "loginTitle": "Prijava",
- "loginLanguage": "Jezik",
- "loginRegister": "Registracija",
- "loginLogin": "Prijava",
- "loginFailed": "Nepravilna e-pošta ali geslo",
- "loginCreated": "Nov uporabnik je registriran",
- "loginLogout": "Odjava",
- "devicesAndState": "Devices and State",
- "deviceDialog": "Naprave",
- "deviceTitle": "Naprave",
- "deviceIdentifier": "Identifikacija",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Ukaz",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Nastavitve",
- "settingsUser": "Račun",
- "settingsGroups": "Groups",
- "settingsServer": "Strežnik",
- "settingsUsers": "Uporabniki",
- "settingsDistanceUnit": "Razdalja",
- "settingsSpeedUnit": "Hitrost",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Poročila",
- "reportDevice": "Naprava",
- "reportFrom": "Od",
- "reportTo": "Do",
- "reportShow": "Prikaži",
- "reportClear": "Očisti",
- "positionFixTime": "Čas",
- "positionValid": "Veljavnost",
- "positionLatitude": "Širina",
- "positionLongitude": "Dolžina",
- "positionAltitude": "Višina",
- "positionSpeed": "Hitrost",
- "positionCourse": "Smer",
- "positionAddress": "Naslov",
- "positionProtocol": "Protokol",
- "serverTitle": "Nastavitve strežnika",
- "serverZoom": "Povečava",
- "serverRegistration": "Registracija",
- "serverReadonly": "Readonly",
- "mapTitle": "Karta",
- "mapLayer": "Zemljevidi",
- "mapCustom": "Poljubna karta",
- "mapOsm": "Open Street Karta",
- "mapBingKey": "Bing Mapk Ključ",
- "mapBingRoad": "Bing Maps Ceste",
- "mapBingAerial": "Bing Maps Satelit",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Stanje",
- "stateName": "Parameter",
- "stateValue": "Vrednost",
- "commandTitle": "Ukaz",
- "commandSend": "Pošlji",
- "commandType": "Tip",
- "commandSent": "Ukaz poslan",
- "commandPositionPeriodic": "Periodično poročanje",
- "commandPositionStop": "Ustavi poročanje",
- "commandEngineStop": "Ugasni motor",
- "commandEngineResume": "Prižgi motor",
- "commandFrequency": "Frekvenca",
- "commandUnit": "Naprava",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/sr.json b/web/l10n/sr.json
deleted file mode 100644
index 1b36e514e..000000000
--- a/web/l10n/sr.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Učitava...",
- "sharedSave": "Sačuvaj",
- "sharedCancel": "Odustani",
- "sharedAdd": "Dodaj",
- "sharedEdit": "Podesi",
- "sharedRemove": "Ukloni",
- "sharedRemoveConfirm": "Ukloniti jedinicu?",
- "sharedKm": "km",
- "sharedMi": "mi",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Čas",
- "sharedMinute": "Minut",
- "sharedSecond": "Sekunda",
- "sharedName": "Ime",
- "sharedDescription": "Opis",
- "sharedSearch": "Traži",
- "sharedGeofence": "Geoograda",
- "sharedGeofences": "Geoograde",
- "sharedNotifications": "Obaveštenja",
- "sharedAttributes": "Osobine",
- "sharedAttribute": "Osobina",
- "sharedArea": "Oblast",
- "sharedMute": "Nečujno",
- "errorTitle": "Greška",
- "errorUnknown": "Nepoznata greška",
- "errorConnection": "Greška u konekciji",
- "userEmail": "Email",
- "userPassword": "Lozinka",
- "userAdmin": "Admin",
- "userRemember": "Zapamti",
- "loginTitle": "Prijava",
- "loginLanguage": "Jezik",
- "loginRegister": "Registruj se",
- "loginLogin": "Prijava",
- "loginFailed": "Neispravna email adresa ili lozinka",
- "loginCreated": "Novi korisnik je registrovan",
- "loginLogout": "Odjava",
- "devicesAndState": "Uređaji i Stanje ",
- "deviceDialog": "Uređaj",
- "deviceTitle": "Uređaji",
- "deviceIdentifier": "Identifikator",
- "deviceLastUpdate": "Poslednji kontakt",
- "deviceCommand": "Komanda",
- "deviceFollow": "Prati",
- "groupDialog": "Grupa",
- "groupParent": "Grupa",
- "groupNoGroup": "Nema grupe",
- "settingsTitle": "Podešavanja",
- "settingsUser": "Nalog",
- "settingsGroups": "Grupe",
- "settingsServer": "Server",
- "settingsUsers": "Korisnici",
- "settingsDistanceUnit": "Udaljenost",
- "settingsSpeedUnit": "Brzina",
- "settingsTwelveHourFormat": "12-časovni format",
- "reportTitle": "Izveštaji",
- "reportDevice": "Uređaj",
- "reportFrom": "Od",
- "reportTo": "Do",
- "reportShow": "Prikaži",
- "reportClear": "Izbriši",
- "positionFixTime": "Vreme",
- "positionValid": "Ispravno",
- "positionLatitude": "Geografska širina",
- "positionLongitude": "Geografska dužina",
- "positionAltitude": "Visina",
- "positionSpeed": "Brzina",
- "positionCourse": "Pravac",
- "positionAddress": "Adresa",
- "positionProtocol": "Protokol",
- "serverTitle": "Podešavanja Servera",
- "serverZoom": "Zumiranje",
- "serverRegistration": "Registracija",
- "serverReadonly": "Readonly verzija",
- "mapTitle": "Mapa",
- "mapLayer": "Vrsta Mape",
- "mapCustom": "Prilagođena mapa",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Višeugao",
- "mapShapeCircle": "Krug",
- "stateTitle": "Stanje",
- "stateName": "Parametar",
- "stateValue": "Vrednost",
- "commandTitle": "Komanda",
- "commandSend": "Pošalji",
- "commandType": "Tip",
- "commandSent": "Komanda je poslata",
- "commandPositionPeriodic": "Periodično izveštavanje",
- "commandPositionStop": "Prekini izveštavanja",
- "commandEngineStop": "Zaustavi motor",
- "commandEngineResume": "Pokreni motor",
- "commandFrequency": "Frekvencija",
- "commandUnit": "Jedinica",
- "commandCustom": "Prilagođena komanda",
- "commandPositionSingle": "Izveštaj za jednog",
- "commandAlarmArm": "Omogući alarm",
- "commandAlarmDisarm": "Onemogući alarm",
- "commandSetTimezone": "Podesi vremensku zonu",
- "commandRequestPhoto": "Zahtevaj fotografiju",
- "commandRebootDevice": "Ponovo pokreni uređaj",
- "commandSendSms": "Pošalji SMS",
- "commandSosNumber": "Podesi SOS broj",
- "commandSilenceTime": "Podesi nečujno vreme ",
- "commandSetPhonebook": "Podesi kontakte",
- "commandVoiceMessage": "Glasovna poruka",
- "commandOutputControl": "Kontrola izlaza",
- "commandAlarmSpeed": "Alarm prekoračenja brzine",
- "commandDeviceIdentification": "Identifikacija uređaja",
- "eventDeviceOnline": "Uređaj je na mreži",
- "eventDeviceOffline": "Uređaj je van mreže",
- "eventDeviceMoving": "Uređaj se kreće",
- "eventDeviceStopped": "Uređaj je zaustavljen",
- "eventDeviceOverspeed": "Uređaj prelazi brzinu",
- "eventCommandResult": "Stanje komande",
- "eventGeofenceEnter": "Uređaj je ušao u geoogradu",
- "eventGeofenceExit": "Uređaj je izašao iz geoograde",
- "eventAlarm": "Alarmi",
- "alarm": "Alarm",
- "alarmSos": "SOS alarm",
- "alarmVibration": "Alarm vibracija",
- "alarmMovement": "Alarm Kretanja",
- "alarmOverspeed": "Prekoračenje brzine alarm",
- "alarmFallDown": "Padanje Alarm",
- "alarmLowBattery": "Slaba baterija alarm",
- "alarmMotion": "Alarm kretanja",
- "alarmFault": "Alarm greške",
- "notificationType": "Tip obaveštenja",
- "notificationWeb": "Pošalji preko Web-a",
- "notificationMail": "Pošalji putem Email-a"
-} \ No newline at end of file
diff --git a/web/l10n/ta.json b/web/l10n/ta.json
deleted file mode 100644
index f328fcaf1..000000000
--- a/web/l10n/ta.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "பதிவு செய்",
- "sharedSave": "சேமி",
- "sharedCancel": "ரத்து செய்",
- "sharedAdd": "சேர்க்க",
- "sharedEdit": "தொகுக்க",
- "sharedRemove": "நீக்குக",
- "sharedRemoveConfirm": "நீக்கம் உறுதி செய்?",
- "sharedKm": "கிமீ",
- "sharedMi": "மைல்",
- "sharedKn": "கடல் மைல்",
- "sharedKmh": "கிமீ/மணிக்கு",
- "sharedMph": "மைல்/மணிக்கு",
- "sharedHour": "மணி நேரம்",
- "sharedMinute": "நிமிடம்",
- "sharedSecond": "விநாடி",
- "sharedName": "பெயர்",
- "sharedDescription": "விளக்கம்",
- "sharedSearch": "தேடுக",
- "sharedGeofence": "பூகோள வேலி",
- "sharedGeofences": "பூகோள வேலிகள்",
- "sharedNotifications": "அறிவிப்புகள்",
- "sharedAttributes": "பண்புகள்",
- "sharedAttribute": "பண்பு",
- "sharedArea": "பகுதி",
- "sharedMute": "Mute",
- "errorTitle": "பிழை",
- "errorUnknown": "அறியப்படாத பிழை",
- "errorConnection": "இணைப்புப் பிழை",
- "userEmail": "மின்னஞ்சல்",
- "userPassword": "கடவுச்சொல்",
- "userAdmin": "நிர்வாகி",
- "userRemember": "Remember",
- "loginTitle": "உள் நுழை",
- "loginLanguage": "மொழி",
- "loginRegister": "பதிவு செய்ய",
- "loginLogin": "உள்நுழைய",
- "loginFailed": "தவறான மின்னஞ்சல் முகவரி அல்லது கடவுச்சொல்",
- "loginCreated": "புதிய பயனர் பதிவு செய்யப்பட்டுள்ளது",
- "loginLogout": "வெளியேறு",
- "devicesAndState": "கருவிகள் மற்றும் அதன் நிலை",
- "deviceDialog": "சாதனம்",
- "deviceTitle": "சாதனம்",
- "deviceIdentifier": "அடையாளங்காட்டி",
- "deviceLastUpdate": "கடைசியாக புதுப்பிக்கப்பட்டது",
- "deviceCommand": "கட்டளை",
- "deviceFollow": "பின்தொடர்",
- "groupDialog": "குழு",
- "groupParent": "குழு",
- "groupNoGroup": "குழு இல்லை",
- "settingsTitle": "அமைப்பு",
- "settingsUser": "கணக்கு",
- "settingsGroups": "குழுக்கள்",
- "settingsServer": "சர்வர்",
- "settingsUsers": "உறுப்பினர்கள்",
- "settingsDistanceUnit": "தூரம்",
- "settingsSpeedUnit": "வேகம்",
- "settingsTwelveHourFormat": "12 மணி நேர வடிவம்",
- "reportTitle": "அறிக்கை",
- "reportDevice": "சாதனம்",
- "reportFrom": "இருந்து",
- "reportTo": "வரை",
- "reportShow": "காண்பி",
- "reportClear": "அழி",
- "positionFixTime": "நேரம்",
- "positionValid": "செல்லுபடியான",
- "positionLatitude": "அட்சரேகை",
- "positionLongitude": "தீர்க்கரேகை",
- "positionAltitude": "உயரம்",
- "positionSpeed": "வேகம்",
- "positionCourse": "பாடநெறி",
- "positionAddress": "முகவரி",
- "positionProtocol": "புரோட்டோகால்",
- "serverTitle": "சர்வர் அமைப்பு",
- "serverZoom": "பெரிதாக்கு",
- "serverRegistration": "பதிவுசெய்ய",
- "serverReadonly": "படிக்கமட்டும்",
- "mapTitle": "வரைபடம்",
- "mapLayer": "வரைபடம் அடுக்கு",
- "mapCustom": "விருப்ப வரைபடம்",
- "mapOsm": "திறமூல தெரு வரைபடம்",
- "mapBingKey": "பிங் வரைபட கீ",
- "mapBingRoad": "பிங் சாலை வரைபடம்",
- "mapBingAerial": "பிங் வான்வழி வரைபடம்",
- "mapShapePolygon": "பலகோணம்",
- "mapShapeCircle": "வட்டம்",
- "stateTitle": "நிலை",
- "stateName": "சாட்டு",
- "stateValue": "மதிப்பு",
- "commandTitle": "கட்டளை",
- "commandSend": "அனுப்பு",
- "commandType": "டைப்",
- "commandSent": "கட்டளை அனுப்பப்பட்டது",
- "commandPositionPeriodic": "காலமுறை அறிக்கையிடல்",
- "commandPositionStop": "அறிக்கையிடுதல் நிறுத்து ",
- "commandEngineStop": "எஞ்சின் நிறுத்து",
- "commandEngineResume": "எஞ்சின் தொடங்க",
- "commandFrequency": "காலஇடைவெளி",
- "commandUnit": "அலகு",
- "commandCustom": "விருப்பமான கட்டளை",
- "commandPositionSingle": "ஒற்றை அறிக்கை",
- "commandAlarmArm": "அலறிமணி துவக்கம்",
- "commandAlarmDisarm": "அலறிமணி நிறுத்தம்",
- "commandSetTimezone": "நேர மண்டலம்",
- "commandRequestPhoto": "புகைப்படம் வேண்டு",
- "commandRebootDevice": "சாதன மறுதுவக்கம்",
- "commandSendSms": "குருஞ்செதி அனுப்பு",
- "commandSosNumber": "அவசர அழைப்பு எண்(SOS)",
- "commandSilenceTime": "அமைதி நேரம் அமைக்க",
- "commandSetPhonebook": "தொலைபேசிப்புத்தகம் அமை",
- "commandVoiceMessage": "குரல் செய்தி",
- "commandOutputControl": "வெளியீட்டு கட்டுப்பாடு",
- "commandAlarmSpeed": "அதி வேக அலறி ",
- "commandDeviceIdentification": "\nசாதன அடையாளம்",
- "eventDeviceOnline": "சாதனம் இணைப்பில் உள்ளது",
- "eventDeviceOffline": "சாதன இணைப்பு துண்டிக்கபட்டது",
- "eventDeviceMoving": "சாதனம் நகருகிறது",
- "eventDeviceStopped": "சாதனம் நின்றுவிட்டது",
- "eventDeviceOverspeed": "சாதனம் நிர்ணயித்த வேகத் திற்கு மேல்",
- "eventCommandResult": "கட்டளை விளைவு",
- "eventGeofenceEnter": "சாதனம் பூகோள வேலியினுள் நுழைந்துள்ளது",
- "eventGeofenceExit": "சாதனம் பூகோள வேலியை விட்டு வெளியேறியது",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "type of notification",
- "notificationWeb": "வலைதளம் வழி அனுப்புக ",
- "notificationMail": "மின்னஞ்சல் வழி அனுப்புக"
-} \ No newline at end of file
diff --git a/web/l10n/th.json b/web/l10n/th.json
deleted file mode 100644
index 63373804e..000000000
--- a/web/l10n/th.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "กำลังโหลด",
- "sharedSave": "จัดเก็บแฟ้มข้อมูล",
- "sharedCancel": "ยกเลิก",
- "sharedAdd": "เพิ่ม",
- "sharedEdit": "ตรวจแก้ ปรับเปลี่ยนข้อมูล",
- "sharedRemove": "ลบรายการ",
- "sharedRemoveConfirm": "ยืนยันลบรายการ",
- "sharedKm": "กม.",
- "sharedMi": "ไมล์",
- "sharedKn": "น๊อต",
- "sharedKmh": "กม./ชม.",
- "sharedMph": "ไมล์ต่อชั่วโมง",
- "sharedHour": "ชั่วโมง",
- "sharedMinute": "นาที",
- "sharedSecond": "วินาที",
- "sharedName": "ชื่อ",
- "sharedDescription": "ลักษณะ",
- "sharedSearch": "ค้นหา",
- "sharedGeofence": "เขตพื้นที่",
- "sharedGeofences": "เขตพื้นที่",
- "sharedNotifications": "การแจ้งเตือน",
- "sharedAttributes": "คุณลักษณะ",
- "sharedAttribute": "คุณลักษณะ",
- "sharedArea": "พื้นที่",
- "sharedMute": "Mute",
- "errorTitle": "ผิดพลาด",
- "errorUnknown": "ข้อผิดพลาดที่ไม่รู้จัก",
- "errorConnection": "การเชื่อมต่อผิดพลาด",
- "userEmail": "อีเมล์",
- "userPassword": "รหัสผ่าน",
- "userAdmin": "ผู้ดูแลระบบ",
- "userRemember": "Remember",
- "loginTitle": "เข้าสู่ระบบ",
- "loginLanguage": "ภาษา",
- "loginRegister": "ลงทะเบียน",
- "loginLogin": "เข้าสู่ระบบ",
- "loginFailed": "ที่อยู่อีเมลหรือรหัสผ่านไม่ถูกต้อง",
- "loginCreated": "ผู้ใช้ใหม่ ได้รับการลงทะเบียน",
- "loginLogout": "ออกจากระบบ",
- "devicesAndState": "อุปกรณ์และสถานะ",
- "deviceDialog": "เครื่อง/อุปกรณ์",
- "deviceTitle": "เครื่อง/อุปกรณ์",
- "deviceIdentifier": "ระบุเลขอุปกรณ์",
- "deviceLastUpdate": "แก้ไขล่าสุด",
- "deviceCommand": "คำสั่ง",
- "deviceFollow": "ติดตาม",
- "groupDialog": "กลุ่ม",
- "groupParent": "กลุ่ม",
- "groupNoGroup": "ไม่จัดกลุ่ม",
- "settingsTitle": "การตั้งค่า",
- "settingsUser": "บัญชีผู้ใช้",
- "settingsGroups": "ตั้งค่ากลุ่ม",
- "settingsServer": "ตั้งค่าระบบ",
- "settingsUsers": "ตั้งค่าผู้ใช้งาน",
- "settingsDistanceUnit": "หน่วยระยะทาง",
- "settingsSpeedUnit": "หน่วยความเร็ว",
- "settingsTwelveHourFormat": "รูปแบบเวลา 12 ชั่วโมง",
- "reportTitle": "รายงาน",
- "reportDevice": "รายงานเครื่อง/อุปกรณ์",
- "reportFrom": "จาก",
- "reportTo": "ไปถึง",
- "reportShow": "แสดง",
- "reportClear": "ล้างรายงาน",
- "positionFixTime": "เวลา",
- "positionValid": "ถูกต้อง",
- "positionLatitude": "ละติจูด",
- "positionLongitude": "ลองจิจูด",
- "positionAltitude": "ระดับความสูง",
- "positionSpeed": "ความเร็ว",
- "positionCourse": "ทิศทาง",
- "positionAddress": "ที่อยู่",
- "positionProtocol": "โปรโตคอล",
- "serverTitle": "การตั้งค่าเซิร์ฟเวอ",
- "serverZoom": "ชยาย +/-",
- "serverRegistration": "ลงทะเบียน",
- "serverReadonly": "อ่านได้อย่างเดียว",
- "mapTitle": "แผนที่",
- "mapLayer": "ชั้นแผนที่",
- "mapCustom": "แผนที่ที่กำหนดเอง",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps สำคัญ",
- "mapBingRoad": "Bing Maps ถนน",
- "mapBingAerial": "Bing Maps ทางอากาศ",
- "mapShapePolygon": "โพลิกอน",
- "mapShapeCircle": "วงกลม",
- "stateTitle": "สถานะ",
- "stateName": "พารามิเตอร์",
- "stateValue": "มูลค่า",
- "commandTitle": "คำสั่ง",
- "commandSend": "ส่ง",
- "commandType": "ชนิด",
- "commandSent": "คำสั่งถูกส่งไปแล้ว",
- "commandPositionPeriodic": "แก้ไขตำแหน่ง",
- "commandPositionStop": "ตำแหน่ง หยุด",
- "commandEngineStop": "ดับเครื่องยนต์",
- "commandEngineResume": "ติดครื่องยนต์ใหม่",
- "commandFrequency": "ความถี่",
- "commandUnit": "หน่วย",
- "commandCustom": "คำสั่งกำหนดเอง",
- "commandPositionSingle": "รายงานตำแหน่งเดียว",
- "commandAlarmArm": "แจ้งเตือนติดต่อสาขา",
- "commandAlarmDisarm": "แจ้งเตือนยกเลิกติดต่อสาขา",
- "commandSetTimezone": "ตั้งค่าเขตเวลา",
- "commandRequestPhoto": "สั่งถ่ายภาพ",
- "commandRebootDevice": "รีบูต",
- "commandSendSms": "ส่ง SMS",
- "commandSosNumber": "ตั้งค่าเลขหมายโทรฉุกเฉิน SOS",
- "commandSilenceTime": "ตั้งค่าช่วงเาลาหยุดนิ่ง",
- "commandSetPhonebook": "ตั้งค่าสมุดโทรศัพท์",
- "commandVoiceMessage": "ข้อความเสียง",
- "commandOutputControl": "ควบคุมข้อมูลที่ส่งออก",
- "commandAlarmSpeed": "แจ้งเตือนความเร็วเกินกำหนด",
- "commandDeviceIdentification": "หมายเลขอุปกรณ์",
- "eventDeviceOnline": "อุปกรณ์เชื่อมต่อแล้ว",
- "eventDeviceOffline": "อุปกรณ์ไม่ได้เชื่อมต่อ",
- "eventDeviceMoving": "อุปกรณ์กำลังเคลื่อนที่",
- "eventDeviceStopped": "อุปกรณ์ไม่เคลื่อนไหว",
- "eventDeviceOverspeed": "อุปกรณ์เกินกำหนดความเร็ว",
- "eventCommandResult": "ผลลัพธ์จากคำสั่ง",
- "eventGeofenceEnter": "อุปกรณ์เข้าในเขตพื้นที่",
- "eventGeofenceExit": "อุปกรณ์ออกนอกเขตพื้นที่",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "ชนิดการแจ้งเตือน",
- "notificationWeb": "ส่งทางเว็บ",
- "notificationMail": "ส่งทางเมล์"
-} \ No newline at end of file
diff --git a/web/l10n/tr.json b/web/l10n/tr.json
deleted file mode 100644
index 7a00586c2..000000000
--- a/web/l10n/tr.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Yükleniyor...",
- "sharedSave": "Kaydet",
- "sharedCancel": "İptal",
- "sharedAdd": "Ekle",
- "sharedEdit": "Düzenle",
- "sharedRemove": "Kaldır",
- "sharedRemoveConfirm": "Öğeyi kaldır",
- "sharedKm": "km",
- "sharedMi": "mil",
- "sharedKn": "Knot",
- "sharedKmh": "km/s",
- "sharedMph": "mil/s",
- "sharedHour": "Saat",
- "sharedMinute": "Dakika",
- "sharedSecond": "Saniye",
- "sharedName": "İsim",
- "sharedDescription": "Açıklama",
- "sharedSearch": "Arama",
- "sharedGeofence": "Güvenli Bölge",
- "sharedGeofences": "Güvenli Bölgeler",
- "sharedNotifications": "Bildirimler",
- "sharedAttributes": "Nitelikler",
- "sharedAttribute": "Nitelik",
- "sharedArea": "Bölge",
- "sharedMute": "Mute",
- "errorTitle": "Hata",
- "errorUnknown": "Bilinmeyen hata ",
- "errorConnection": "Bağlantı Hatası",
- "userEmail": "Eposta",
- "userPassword": "Şifre",
- "userAdmin": "Yönetici",
- "userRemember": "Remember",
- "loginTitle": "Oturum aç",
- "loginLanguage": "Lisan",
- "loginRegister": "Kayıt",
- "loginLogin": "Oturumu aç",
- "loginFailed": "Geçersiz eposta veya şifre",
- "loginCreated": "Yeni kullanıcı kaydedildi",
- "loginLogout": "Oturumu sonlandır",
- "devicesAndState": "Cihazlar ve Bölge",
- "deviceDialog": "Cihaz",
- "deviceTitle": "Cihazlar",
- "deviceIdentifier": "Kimlik",
- "deviceLastUpdate": "Son Güncelleme",
- "deviceCommand": "Komut",
- "deviceFollow": "Takip",
- "groupDialog": "Grup",
- "groupParent": "Grup",
- "groupNoGroup": "Grupsuz",
- "settingsTitle": "Ayarlar",
- "settingsUser": "Hesap",
- "settingsGroups": "Gruplar",
- "settingsServer": "Sunucu",
- "settingsUsers": "Kullanıcı",
- "settingsDistanceUnit": "Mesafe",
- "settingsSpeedUnit": "Hız",
- "settingsTwelveHourFormat": "12 saat formatı",
- "reportTitle": "Raporlar",
- "reportDevice": "Aygıt",
- "reportFrom": "Başlangıç",
- "reportTo": "Varış",
- "reportShow": "Göster",
- "reportClear": "Temizle",
- "positionFixTime": "Süre",
- "positionValid": "Geçerli",
- "positionLatitude": "Enlem",
- "positionLongitude": "Boylam",
- "positionAltitude": "Rakım",
- "positionSpeed": "Sürat",
- "positionCourse": "Yön",
- "positionAddress": "Adres",
- "positionProtocol": "Protokol",
- "serverTitle": "Sunucu Ayarları",
- "serverZoom": "Yakınlaştırma",
- "serverRegistration": "Kayıt",
- "serverReadonly": "Saltokunur",
- "mapTitle": "Harita",
- "mapLayer": "Harita Katmanı",
- "mapCustom": "Özelleştirilmiş Harita",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Çokgen",
- "mapShapeCircle": "Çember",
- "stateTitle": "Bölge",
- "stateName": "Özellik",
- "stateValue": "Değer",
- "commandTitle": "Komut",
- "commandSend": "Gönder",
- "commandType": "Tip",
- "commandSent": "Komut gönderildi",
- "commandPositionPeriodic": "Periyodik Rapor",
- "commandPositionStop": "Raporlamayı Durdur",
- "commandEngineStop": "Motoru Durdur",
- "commandEngineResume": "Motoru Çalıştır",
- "commandFrequency": "Frekans",
- "commandUnit": "Ünite",
- "commandCustom": "Özel komut",
- "commandPositionSingle": "Tekil Raporlama",
- "commandAlarmArm": "Alarm Kur",
- "commandAlarmDisarm": "Alarmı Kapat",
- "commandSetTimezone": "Zaman Dilimini Belirle",
- "commandRequestPhoto": "Fotoğraf İste",
- "commandRebootDevice": "Aygıtı Yeniden Başlat",
- "commandSendSms": "SMS Gönder",
- "commandSosNumber": "Acil Durum Numarasını Belirle",
- "commandSilenceTime": "Sessiz Zamanı Belirle",
- "commandSetPhonebook": "Telefon Defterini Belirle",
- "commandVoiceMessage": "Ses Mesajı",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Cihaz çevrimiçi",
- "eventDeviceOffline": "Cihaz çevrimdışı",
- "eventDeviceMoving": "Cihaz hareket halinde",
- "eventDeviceStopped": "Cihaz durdu",
- "eventDeviceOverspeed": "Cihaz hızı aştı",
- "eventCommandResult": "Komut sonucu",
- "eventGeofenceEnter": "Cihaz güvenli bölgede",
- "eventGeofenceExit": "Cihaz güvenli bölgeden çıktı",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Bildirim tipi",
- "notificationWeb": "Wed ile gönder",
- "notificationMail": "E-posta ile gönder"
-} \ No newline at end of file
diff --git a/web/l10n/uk.json b/web/l10n/uk.json
deleted file mode 100644
index 02096ec5d..000000000
--- a/web/l10n/uk.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Завантаження... ",
- "sharedSave": "Зберегти",
- "sharedCancel": "Відміна",
- "sharedAdd": "Додати",
- "sharedEdit": "Редагувати",
- "sharedRemove": "Видалити",
- "sharedRemoveConfirm": "Видалити пункт?",
- "sharedKm": "км",
- "sharedMi": "Милi",
- "sharedKn": "kn",
- "sharedKmh": "км/год",
- "sharedMph": "Миль/год",
- "sharedHour": "Години",
- "sharedMinute": "Хвилини",
- "sharedSecond": "Секунди",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "Помилка",
- "errorUnknown": "Невiдома помилка",
- "errorConnection": "Помилка з'єднання",
- "userEmail": "E-mail",
- "userPassword": "Пароль",
- "userAdmin": "Адмiнiстратор",
- "userRemember": "Remember",
- "loginTitle": "Логiн",
- "loginLanguage": "Мова",
- "loginRegister": "Реєстрація",
- "loginLogin": "Ввійти",
- "loginFailed": "Неправильне адреса електронної пошти або пароль",
- "loginCreated": "Новий користувач був зареєстрований",
- "loginLogout": "Вийти",
- "devicesAndState": "Devices and State",
- "deviceDialog": "Пристрій",
- "deviceTitle": " Прилади",
- "deviceIdentifier": "Iдентифікатор",
- "deviceLastUpdate": "Last Update",
- "deviceCommand": "Команда",
- "deviceFollow": "Follow",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "Налаштування",
- "settingsUser": "Аккаунт",
- "settingsGroups": "Groups",
- "settingsServer": "Сервер",
- "settingsUsers": "Користувач",
- "settingsDistanceUnit": "Відстань",
- "settingsSpeedUnit": "Швидкість",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "Звіти",
- "reportDevice": "Пристрій ",
- "reportFrom": "З",
- "reportTo": "До",
- "reportShow": "Показати",
- "reportClear": "Очистити",
- "positionFixTime": "Час ",
- "positionValid": "Дійсний",
- "positionLatitude": "Широта",
- "positionLongitude": "Довгота ",
- "positionAltitude": "Висота",
- "positionSpeed": "Швидкість ",
- "positionCourse": "Курс",
- "positionAddress": "Адреса",
- "positionProtocol": "Протокол",
- "serverTitle": "Налаштування сервера",
- "serverZoom": "Наближення",
- "serverRegistration": "Реєстрація",
- "serverReadonly": "Readonly",
- "mapTitle": "Карта",
- "mapLayer": "Шар карти",
- "mapCustom": "Користувальницька карта",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Ключ Bing Maps ",
- "mapBingRoad": "Bing Maps Дороги",
- "mapBingAerial": "Bing Maps Супутник",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "Стан",
- "stateName": "Атрибут",
- "stateValue": "Значення ",
- "commandTitle": "Команда ",
- "commandSend": "Послати. ",
- "commandType": "Тип",
- "commandSent": "Команда була відправлена",
- "commandPositionPeriodic": "Періодична звітність",
- "commandPositionStop": "Скасувати відстеження. ",
- "commandEngineStop": "Заблокувати двигун ",
- "commandEngineResume": "Розблокувати двигун",
- "commandFrequency": "Частота",
- "commandUnit": "Одиниці",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/l10n/vi.json b/web/l10n/vi.json
deleted file mode 100644
index 55d356751..000000000
--- a/web/l10n/vi.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "Đang tải...",
- "sharedSave": "Lưu",
- "sharedCancel": "Hủy",
- "sharedAdd": "Thêm mới",
- "sharedEdit": "Chỉnh sửa",
- "sharedRemove": "Xóa",
- "sharedRemoveConfirm": "Xóa lựa chọn?",
- "sharedKm": "km",
- "sharedMi": "dặm",
- "sharedKn": "kn",
- "sharedKmh": "km/h",
- "sharedMph": "mph",
- "sharedHour": "Giờ",
- "sharedMinute": "Phút",
- "sharedSecond": "Giây",
- "sharedName": "Tên",
- "sharedDescription": "Mô tả",
- "sharedSearch": "Tìm kiếm",
- "sharedGeofence": "Giới hạn địa lý",
- "sharedGeofences": "Giới hạn địa lý",
- "sharedNotifications": "Thông báo",
- "sharedAttributes": "Thuộc tính",
- "sharedAttribute": "Thuộc tính",
- "sharedArea": "Khu vực",
- "sharedMute": "Mute",
- "errorTitle": "Lỗi",
- "errorUnknown": "Lỗi không xác định",
- "errorConnection": "Lỗi kết nối",
- "userEmail": "Email",
- "userPassword": "Mật khẩu",
- "userAdmin": "Quản trị",
- "userRemember": "Remember",
- "loginTitle": "Đăng nhập",
- "loginLanguage": "Ngôn ngữ",
- "loginRegister": "Đăng ký",
- "loginLogin": "Đăng nhập",
- "loginFailed": "Sai mật khẩu hoặc địa chỉ email",
- "loginCreated": "Người dùng mới đã được đăng ký",
- "loginLogout": "Đăng xuất",
- "devicesAndState": "Các thiết bị và trạng thái",
- "deviceDialog": "Thiết bị",
- "deviceTitle": "Các thiết bị",
- "deviceIdentifier": "Định danh",
- "deviceLastUpdate": "Cập nhật lần cuối",
- "deviceCommand": "Lệnh",
- "deviceFollow": "Theo dõi",
- "groupDialog": "Nhóm",
- "groupParent": "Nhóm",
- "groupNoGroup": "Không có nhóm",
- "settingsTitle": "Cài đặt",
- "settingsUser": "Tài khoản",
- "settingsGroups": "Nhóm",
- "settingsServer": "Máy chủ",
- "settingsUsers": "Người dùng",
- "settingsDistanceUnit": "Khoảng cách",
- "settingsSpeedUnit": "Tốc độ",
- "settingsTwelveHourFormat": "Định dạng 12h",
- "reportTitle": "Báo cáo",
- "reportDevice": "Thiết bị",
- "reportFrom": "Từ",
- "reportTo": "Đến",
- "reportShow": "Hiển thị",
- "reportClear": "Xóa",
- "positionFixTime": "Thời gian",
- "positionValid": "Có hiệu lực",
- "positionLatitude": "Vĩ độ",
- "positionLongitude": "Kinh độ",
- "positionAltitude": "Độ cao",
- "positionSpeed": "Tốc độ",
- "positionCourse": "Hướng",
- "positionAddress": "Địa chỉ",
- "positionProtocol": "Giao thức",
- "serverTitle": "Cài đặt máy chủ",
- "serverZoom": "Phóng to",
- "serverRegistration": "Đăng ký",
- "serverReadonly": "Chỉ đọc",
- "mapTitle": "Bản đồ",
- "mapLayer": "Lớp bản đồ",
- "mapCustom": "Bản đồ tùy chỉnh",
- "mapOsm": "Open Street Map",
- "mapBingKey": "Bing Maps Key",
- "mapBingRoad": "Bing Maps Road",
- "mapBingAerial": "Bing Maps Aerial",
- "mapShapePolygon": "Đa giác",
- "mapShapeCircle": "Vòng tròn",
- "stateTitle": "Trạng thái",
- "stateName": "Thuộc tính",
- "stateValue": "Giá trị",
- "commandTitle": "Lệnh",
- "commandSend": "Gửi",
- "commandType": "Loại",
- "commandSent": "Lệnh đã được gửi",
- "commandPositionPeriodic": "Báo cáo định kỳ",
- "commandPositionStop": "Dừng báo cáo",
- "commandEngineStop": "Tắt máy",
- "commandEngineResume": "Bật máy",
- "commandFrequency": "Tần suất",
- "commandUnit": "Đơn vị",
- "commandCustom": "Lệnh tùy chỉnh",
- "commandPositionSingle": "Báo cáo đơn",
- "commandAlarmArm": "Báo động cho phép",
- "commandAlarmDisarm": "Báo động không cho phép",
- "commandSetTimezone": "Thiết lập múi giờ",
- "commandRequestPhoto": "Yêu cầu ảnh",
- "commandRebootDevice": "Khởi động lại thiết bị",
- "commandSendSms": "Gửi tin nhắn",
- "commandSosNumber": "Thiết lập số khẩn cấp",
- "commandSilenceTime": "Thiêt lập giờ im lặng",
- "commandSetPhonebook": "Thiết lập danh bạ điện thoại",
- "commandVoiceMessage": "Tin nhắn thoại",
- "commandOutputControl": "Điều khiển đầu ra",
- "commandAlarmSpeed": "Báo động quá tốc độ",
- "commandDeviceIdentification": "Định danh thiết bị",
- "eventDeviceOnline": "Thiết bị trực tuyến",
- "eventDeviceOffline": "Thiết bị ngoại tuyến",
- "eventDeviceMoving": "Thiết bị đang di chuyển",
- "eventDeviceStopped": "Thiết bị đã dừng",
- "eventDeviceOverspeed": "Thiết bị vượt quá tốc độ",
- "eventCommandResult": "Kết quả lệnh",
- "eventGeofenceEnter": "Thiết bị đã đi vào giới hạn địa lý",
- "eventGeofenceExit": "Thiết bị đã thoát khỏi giới hạn địa lý",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Loại thông báo",
- "notificationWeb": "Gửi từ web",
- "notificationMail": "Gửi từ mail"
-} \ No newline at end of file
diff --git a/web/l10n/zh.json b/web/l10n/zh.json
deleted file mode 100644
index bb9761d43..000000000
--- a/web/l10n/zh.json
+++ /dev/null
@@ -1,136 +0,0 @@
-{
- "sharedLoading": "加载",
- "sharedSave": "保存",
- "sharedCancel": "取消",
- "sharedAdd": "新建",
- "sharedEdit": "编辑",
- "sharedRemove": "移除",
- "sharedRemoveConfirm": "要移除选项吗?",
- "sharedKm": "千米",
- "sharedMi": "海里",
- "sharedKn": "kn",
- "sharedKmh": "千米/小时",
- "sharedMph": "每小时英里数",
- "sharedHour": "小时",
- "sharedMinute": "分钟",
- "sharedSecond": "秒",
- "sharedName": "Name",
- "sharedDescription": "Description",
- "sharedSearch": "Search",
- "sharedGeofence": "Geofence",
- "sharedGeofences": "Geofences",
- "sharedNotifications": "Notifications",
- "sharedAttributes": "Attributes",
- "sharedAttribute": "Attribute",
- "sharedArea": "Area",
- "sharedMute": "Mute",
- "errorTitle": "错误",
- "errorUnknown": "未知错误",
- "errorConnection": "连接错误",
- "userEmail": "邮箱",
- "userPassword": "密码",
- "userAdmin": "管理员",
- "userRemember": "Remember",
- "loginTitle": "登录",
- "loginLanguage": "语言",
- "loginRegister": "注册",
- "loginLogin": "登录",
- "loginFailed": "邮箱地址或密码不对",
- "loginCreated": "新用户已经被注册了",
- "loginLogout": "登出",
- "devicesAndState": "设备和状态",
- "deviceDialog": "设备",
- "deviceTitle": "设备",
- "deviceIdentifier": "标识符",
- "deviceLastUpdate": "最后更新",
- "deviceCommand": "指令",
- "deviceFollow": "遵循",
- "groupDialog": "Group",
- "groupParent": "Group",
- "groupNoGroup": "No Group",
- "settingsTitle": "设置",
- "settingsUser": "账户",
- "settingsGroups": "Groups",
- "settingsServer": "服务器",
- "settingsUsers": "用户",
- "settingsDistanceUnit": "距离",
- "settingsSpeedUnit": "速度",
- "settingsTwelveHourFormat": "12-hour Format",
- "reportTitle": "报表",
- "reportDevice": "设备",
- "reportFrom": "开始",
- "reportTo": "结束",
- "reportShow": "显示",
- "reportClear": "清空",
- "positionFixTime": "时间",
- "positionValid": "有效",
- "positionLatitude": "纬度",
- "positionLongitude": "经度",
- "positionAltitude": "海拔",
- "positionSpeed": "速度",
- "positionCourse": "航向",
- "positionAddress": "地址",
- "positionProtocol": "协议",
- "serverTitle": "服务器设置",
- "serverZoom": "缩放",
- "serverRegistration": "注册",
- "serverReadonly": "只读",
- "mapTitle": "地图",
- "mapLayer": "地图图层",
- "mapCustom": "自定义地图",
- "mapOsm": "OpenStreetMap 地图",
- "mapBingKey": "Bing 旅游重点",
- "mapBingRoad": "Bing 公路线路地图",
- "mapBingAerial": "Bing 航测地图",
- "mapShapePolygon": "Polygon",
- "mapShapeCircle": "Circle",
- "stateTitle": "状态",
- "stateName": "参数",
- "stateValue": "数值",
- "commandTitle": "命令",
- "commandSend": "发送",
- "commandType": "类型",
- "commandSent": "命令已发送",
- "commandPositionPeriodic": "位置获取",
- "commandPositionStop": "位置停止",
- "commandEngineStop": "引擎熄火",
- "commandEngineResume": "引擎启动",
- "commandFrequency": "频率",
- "commandUnit": "单位",
- "commandCustom": "Custom command",
- "commandPositionSingle": "Single Reporting",
- "commandAlarmArm": "Arm Alarm",
- "commandAlarmDisarm": "Disarm Alarm",
- "commandSetTimezone": "Set Timezone",
- "commandRequestPhoto": "Request Photo",
- "commandRebootDevice": "Reboot Device",
- "commandSendSms": "Send SMS",
- "commandSosNumber": "Set SOS Number",
- "commandSilenceTime": "Set Silence Time",
- "commandSetPhonebook": "Set Phonebook",
- "commandVoiceMessage": "Voice Message",
- "commandOutputControl": "Output Control",
- "commandAlarmSpeed": "Overspeed Alarm",
- "commandDeviceIdentification": "Device Identification",
- "eventDeviceOnline": "Device is online",
- "eventDeviceOffline": "Device is offline",
- "eventDeviceMoving": "Device is moving",
- "eventDeviceStopped": "Device is stopped",
- "eventDeviceOverspeed": "Device exceeds the speed",
- "eventCommandResult": "Command result",
- "eventGeofenceEnter": "Device has entered geofence",
- "eventGeofenceExit": "Device has exited geofence",
- "eventAlarm": "Alarms",
- "alarm": "Alarm",
- "alarmSos": "SOS Alarm",
- "alarmVibration": "Vibration Alarm",
- "alarmMovement": "Movement Alarm",
- "alarmOverspeed": "Overspeed Alarm",
- "alarmFallDown": "FallDown Alarm",
- "alarmLowBattery": "LowBattery Alarm",
- "alarmMotion": "Motion Alarm",
- "alarmFault": "Fault Alarm",
- "notificationType": "Type of Notification",
- "notificationWeb": "Send via Web",
- "notificationMail": "Send via Mail"
-} \ No newline at end of file
diff --git a/web/locale.js b/web/locale.js
deleted file mode 100644
index 4de476c90..000000000
--- a/web/locale.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var Locale = {};
-
-Locale.languages = {
- 'ar': { name: 'العربية', code: 'en' },
- 'bg': { name: 'Български', code: 'bg' },
- 'cs': { name: 'Čeština', code: 'cs' },
- 'de': { name: 'Deutsch', code: 'de' },
- 'da': { name: 'Dansk', code: 'da' },
- 'el': { name: 'Ελληνικά', code: 'el' },
- 'en': { name: 'English', code: 'en' },
- 'es': { name: 'Español', code: 'es' },
- 'fa': { name: 'فارسی', code: 'fa' },
- 'fi': { name: 'Suomi', code: 'fi' },
- 'fr': { name: 'Français', code: 'fr' },
- 'he': { name: 'עברית', code: 'he' },
- 'hu': { name: 'Magyar', code: 'hu' },
- 'id': { name: 'Bahasa Indonesia', code: 'id' },
- 'it': { name: 'Italiano', code: 'it' },
- 'ka': { name: 'ქართული', code: 'en' },
- 'lo': { name: 'ລາວ', code: 'en' },
- 'lt': { name: 'Lietuvių', code: 'lt' },
- 'ml': { name: 'മലയാളം', code: 'en' },
- 'ms': { name: 'بهاس ملايو', code: 'en' },
- 'nb': { name: 'Norsk bokmål', code: 'no_NB' },
- 'ne': { name: 'नेपाली', code: 'en' },
- 'nl': { name: 'Nederlands', code: 'nl' },
- 'nn': { name: 'Norsk nynorsk', code: 'no_NN' },
- 'pl': { name: 'Polski', code: 'pl' },
- 'pt': { name: 'Português', code: 'pt' },
- 'pt_BR': { name: 'Português (Brasil)', code: 'pt_BR' },
- 'ro': { name: 'Română', code: 'ro' },
- 'ru': { name: 'Русский', code: 'ru' },
- 'si': { name: 'සිංහල', code: 'en' },
- 'sk': { name: 'Slovenčina', code: 'sk' },
- 'sl': { name: 'Slovenščina', code: 'sl' },
- 'sr': { name: 'Srpski', code: 'sr' },
- 'ta': { name: 'தமிழ்', code: 'en' },
- 'th': { name: 'ไทย', code: 'th' },
- 'tr': { name: 'Türkçe', code: 'tr' },
- 'uk': { name: 'Українська', code: 'ukr' },
- 'vi': { name: 'Tiếng Việt', code: 'en' },
- 'zh': { name: '中文', code: 'zh_CN' }
-};
-
-Locale.language = Ext.Object.fromQueryString(window.location.search.substring(1)).locale;
-if (Locale.language === undefined) {
- Locale.language = window.navigator.userLanguage || window.navigator.language;
- Locale.language = Locale.language.substr(0, 2);
-}
-
-if (!(Locale.language in Locale.languages)) {
- Locale.language = 'en'; // default
-}
-
-Ext.Ajax.request({
- url: 'l10n/' + Locale.language + '.json',
- callback: function (options, success, response) {
- Strings = Ext.decode(response.responseText);
- }
-});
-
-Ext.Loader.loadScript('//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-' + Locale.languages[Locale.language].code + '.js');
diff --git a/web/release.html b/web/release.html
deleted file mode 100644
index 4e087922a..000000000
--- a/web/release.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<title>Traccar</title>
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/resources/theme-neptune-all.css">
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol.css">
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
-<link rel="stylesheet" href="app.css">
-</head>
-<body>
-<div id="spinner"></div>
-<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div>
-<script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/ext-all.js"></script>
-<script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/theme-neptune.js"></script>
-<script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol-debug.js"></script>
-<script src="arrowstyle.js"></script>
-<script src="locale.js"></script>
-<script type="text/javascript">
-Ext.Loader.loadScript('app.min.js');
-</script>
-</body>
-</html>