@@ -138,7 +138,7 @@ index 014ab7d..b48e047 100644
138138 <!-- fix for small devices only -->
139139 <div class='clearfix visible-sm-block'></div>
140140diff --git a/src/components/dash/Stats.vue b/src/components/dash/Stats.vue
141- index aab3537..81bc5fc 100644
141+ index aab3537..a31bc6c 100644
142142--- a/src/components/dash/Stats.vue
143143+++ b/src/components/dash/Stats.vue
144144@@ -2,13 +2,13 @@
@@ -195,6 +195,23 @@ index aab3537..81bc5fc 100644
195195 lastQueryURL: '',
196196 modeHeader: '',
197197 mode: '',
198+ @@ -525,14 +525,14 @@ module.exports = {
199+ if (mode === 'tickets') {
200+ return ['sent-at_after', 'sent-at_before']
201+ } else {
202+ - return ['time-observation_after', 'time-observation_before']
203+ + return ['time-source_before', 'time-source_before']
204+ }
205+ },
206+ getTimeResParamLabels: function (mode) {
207+ if (mode === 'tickets') {
208+ return ['Sent after', 'Sent before']
209+ } else {
210+ - return ['Observed after', 'Observed before']
211+ + return ['Time.source after', 'Time.source before']
212+ }
213+ },
214+ loadEvents: function () {
198215@@ -825,9 +825,9 @@ module.exports = {
199216 An alternative to the solution active below is to use the jquery style
200217 which uses images, but the color on the images does not match adminlte.
@@ -224,18 +241,34 @@ index 0b224af..026b00b 100644
224241 table.dataTable thead > tr > th {
225242 text-align: right;
226243diff --git a/src/components/widgets/IBoxEventsToday.vue b/src/components/widgets/IBoxEventsToday.vue
227- index d1bff29..8c1b432 100644
244+ index d1bff29..1d88f68 100644
228245--- a/src/components/widgets/IBoxEventsToday.vue
229246+++ b/src/components/widgets/IBoxEventsToday.vue
230- @@ -49,7 +49,7 @@ module.exports = {
247+ @@ -42,16 +42,22 @@ module.exports = {
248+ // show the amount of todays Events
249+ var tomorrow = new Date()
250+ var today = new Date()
251+ + var sevenDaysAgo = new.Date()
252+
253+ tomorrow.setDate(tomorrow.getDate() + 1)
254+ + sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7)
255+ + sevenDaysAgo = sevenDaysAgo.toJSON().split('T')[0]
256+
257+ today = today.toJSON().split('T')[0]
231258 tomorrow = tomorrow.toJSON().split('T')[0]
232259
233260 // show the amount of todays Tickets
234261- var url = '/api/events/stats?' +
262+ + // we require to always have time.source
235263+ var url = '/fody/api/events/stats?' +
236264 'time-observation_after=' + today +
237- '&time-observation_before=' + tomorrow
265+ - '&time-observation_before=' + tomorrow
266+ + '&time-observation_before=' + tomorrow +
267+ + '&time-source_after=' + sevenDaysAgo +
268+ + '&time-source_before=' + tomorrow
238269
270+ this.events = -1 // loading (if this function is called a second time)
271+ this.$http.get(url).then((response) => {
239272diff --git a/src/main.js b/src/main.js
240273index 03142cd..4e16ca3 100644
241274--- a/src/main.js
0 commit comments