@tiledesk/tiledesk-server 2.2.18 → 2.2.20
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/routes/public-analytics.js +22 -20
- package/routes/widget.js +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -11,27 +11,29 @@ var winston = require('../config/winston');
|
|
11
11
|
//winston.debug(req.params);
|
12
12
|
//winston.debug("req.projectid", req.projectid);
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
14
|
+
res.json([]);
|
15
|
+
|
16
|
+
// AnalyticResult.aggregate([
|
17
|
+
// //last 4
|
18
|
+
// { $match: {"id_project":req.projectid, "createdAt" : { $gte : new Date((new Date().getTime() - (4 * 60 * 60 * 1000))) }} },
|
19
|
+
// { "$group": {
|
20
|
+
// "_id": "$id_project",
|
21
|
+
// "waiting_time_avg":{"$avg": "$waiting_time"}
|
22
|
+
// }
|
23
|
+
// },
|
22
24
|
|
23
|
-
])
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
});
|
25
|
+
// ])
|
26
|
+
// // .cache(cacheUtil.longTTL, req.projectid+":analytics:query:waiting:avg:4hours")
|
27
|
+
// .exec(function(err, result) {
|
28
|
+
|
29
|
+
// if (err) {
|
30
|
+
// winston.debug(err);
|
31
|
+
// return res.status(500).send({success: false, msg: 'Error getting analytics.'});
|
32
|
+
// }
|
33
|
+
// //winston.debug(result);
|
34
|
+
|
35
|
+
// res.json(result);
|
36
|
+
// });
|
35
37
|
|
36
38
|
});
|
37
39
|
|