diff --git a/README.md b/README.md
index d4d58dc..0ef2521 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,6 @@ the container please mount a volume in ``/var/www/html/data/``
# Config
You can configure the visualization frontend via ``appConfig.js``
copy the ``/js/appConfig.example.js`` into ``/data/appConfig.js`` (where your volume should be mounted).
-Change ``let appConfig = {`` to ``appConfig = {`` in /data/appConfig.js
#### Libs used
1. Bootstrap 4 - alpha
diff --git a/index.html b/index.html
index eb2b815..ff1dcec 100755
--- a/index.html
+++ b/index.html
@@ -18,8 +18,8 @@
-
+
diff --git a/js/appConfig.example.js b/js/appConfig.example.js
index ae9ef42..5539a73 100644
--- a/js/appConfig.example.js
+++ b/js/appConfig.example.js
@@ -1,30 +1,37 @@
/**
* To customize your settings:
* 1. copy appConfig.example.js into /data/appConfig.js
- * 2. change "let appConfig = {" to "appConfig = {" in /data/appConfig.js
+ * 2. change values in /data/appConfig.js
* 3. restart the container if it is already running
*/
-let appConfig = {
- "customTitle": "Statistics",
- "dateFormat": "DD.MM.YYYY",
- "locale": "de",
- "labels": {
- "download": "Download",
- "ping": "Ping",
- "upload": "Upload"
- },
- "daterange": {
- "timePicker": true,
- "timePicker24Hour": true,
- "startDate": moment().startOf('day'),
- "endDate": moment().endOf('day'),
- ranges: {
- 'Today': [moment().hours(0).minutes(0).seconds(0), moment().hours(23).minutes(59).seconds(59)],
- 'Yesterday': [moment().hours(0).minutes(0).seconds(0).subtract(1, 'days'), moment().hours(23).minutes(59).seconds(59).subtract(1, 'days')],
- 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
- 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
- 'This Month': [moment().startOf('month'), moment().endOf('month')],
- 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+if (typeof appConfig == 'undefined') {
+ var appConfig = {};
+}
+
+appConfig = {
+ ...appConfig,
+ ...{
+ "customTitle": "Statistics",
+ "dateFormat": "DD.MM.YYYY",
+ "locale": "de",
+ "labels": {
+ "download": "Download",
+ "ping": "Ping",
+ "upload": "Upload"
+ },
+ "daterange": {
+ "timePicker": true,
+ "timePicker24Hour": true,
+ "startDate": moment().startOf('day'),
+ "endDate": moment().endOf('day'),
+ ranges: {
+ 'Today': [moment().hours(0).minutes(0).seconds(0), moment().hours(23).minutes(59).seconds(59)],
+ 'Yesterday': [moment().hours(0).minutes(0).seconds(0).subtract(1, 'days'), moment().hours(23).minutes(59).seconds(59).subtract(1, 'days')],
+ 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
+ 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+ }
}
}
};