aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/client/view/ArchiveView.java5
-rw-r--r--src/org/traccar/web/shared/model/ApplicationSettings.java6
-rw-r--r--src/org/traccar/web/shared/model/UserSettings.java6
3 files changed, 15 insertions, 2 deletions
diff --git a/src/org/traccar/web/client/view/ArchiveView.java b/src/org/traccar/web/client/view/ArchiveView.java
index d510cbe1..04ece4af 100644
--- a/src/org/traccar/web/client/view/ArchiveView.java
+++ b/src/org/traccar/web/client/view/ArchiveView.java
@@ -128,8 +128,9 @@ public class ArchiveView implements SelectionChangedEvent.SelectionChangedHandle
// Initialize with current time
Date now = new Date();
- fromDate.setValue(now);
- fromTime.setValue(now);
+ Date from = new Date(now.getTime() - 60 * 60 * 1000);
+ fromDate.setValue(from);
+ fromTime.setValue(from);
toDate.setValue(now);
toTime.setValue(now);
}
diff --git a/src/org/traccar/web/shared/model/ApplicationSettings.java b/src/org/traccar/web/shared/model/ApplicationSettings.java
index ecbd1832..6f5bfe5c 100644
--- a/src/org/traccar/web/shared/model/ApplicationSettings.java
+++ b/src/org/traccar/web/shared/model/ApplicationSettings.java
@@ -3,6 +3,8 @@ package org.traccar.web.shared.model;
import java.io.Serializable;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@@ -11,6 +13,10 @@ public class ApplicationSettings implements Serializable {
private static final long serialVersionUID = 1;
+ @Id
+ @GeneratedValue
+ private long id;
+
public ApplicationSettings() {
registrationEnabled = true;
}
diff --git a/src/org/traccar/web/shared/model/UserSettings.java b/src/org/traccar/web/shared/model/UserSettings.java
index f7163a16..3f6deeaf 100644
--- a/src/org/traccar/web/shared/model/UserSettings.java
+++ b/src/org/traccar/web/shared/model/UserSettings.java
@@ -5,6 +5,8 @@ import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@@ -13,6 +15,10 @@ public class UserSettings implements Serializable {
private static final long serialVersionUID = 1;
+ @Id
+ @GeneratedValue
+ private long id;
+
public UserSettings() {
speedUnit = SpeedUnit.knots;
}