aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>