aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 16:43:50 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 16:43:50 +1200
commita8c29ae1508ef9b099860938b2b6911691cba567 (patch)
tree6b9ea77ddcc799814a059a39af48e880751383d3
parente9d300e00f244a56246809a3edace996286f1e19 (diff)
downloadtrackermap-server-a8c29ae1508ef9b099860938b2b6911691cba567.tar.gz
trackermap-server-a8c29ae1508ef9b099860938b2b6911691cba567.tar.bz2
trackermap-server-a8c29ae1508ef9b099860938b2b6911691cba567.zip
Add debug and release web versions
-rw-r--r--debug.xml1
-rw-r--r--src/org/traccar/http/WebServer.java6
-rw-r--r--web/debug.html (renamed from web/index.html)5
-rw-r--r--web/release.html15
4 files changed, 23 insertions, 4 deletions
diff --git a/debug.xml b/debug.xml
index bdc92b04c..d9d9b8401 100644
--- a/debug.xml
+++ b/debug.xml
@@ -13,6 +13,7 @@
<entry key='web.old'>true</entry>-->
<entry key='web.path'>web</entry>
<entry key='web.mobile'>webm</entry>
+ <entry key='web.debug'>true</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='geocoder.type'>nominatim</entry>
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java
index 9030e992b..21a7ba775 100644
--- a/src/org/traccar/http/WebServer.java
+++ b/src/org/traccar/http/WebServer.java
@@ -66,7 +66,11 @@ public class WebServer {
ResourceHandler resourceHandler = new ResourceHandler();
resourceHandler.setResourceBase(properties.getProperty("web.path"));
- resourceHandler.setWelcomeFiles(new String[]{"index.html"});
+ if (Boolean.valueOf(properties.getProperty("web.debug"))) {
+ resourceHandler.setWelcomeFiles(new String[]{"debug.html"});
+ } else {
+ resourceHandler.setWelcomeFiles(new String[]{"release.html"});
+ }
HandlerList handlerList = new HandlerList();
handlerList.setHandlers(new Handler[] {servletHandler, resourceHandler});
diff --git a/web/index.html b/web/debug.html
index d806ddb2d..6210ad663 100644
--- a/web/index.html
+++ b/web/debug.html
@@ -3,11 +3,10 @@
<head>
<title>Traccar</title>
<link rel="stylesheet" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
-<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.5.0/ol.css">
-<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
+<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.css">
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js"></script>
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
-<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.5.0/ol-debug.js"></script>
+<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body>
diff --git a/web/release.html b/web/release.html
new file mode 100644
index 000000000..75077a8f2
--- /dev/null
+++ b/web/release.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Traccar</title>
+<link rel="stylesheet" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
+<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.min.css">
+<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script>
+<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
+<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.min.js"></script>
+<script>Ext.Loader.setConfig({ enabled: false });</script>
+<script type="text/javascript" src="app.min.js"></script>
+</head>
+<body>
+</body>
+</html>