@tiledesk/tiledesk-server 2.2.20 → 2.2.21
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -3
- package/package.json +1 -1
- package/routes/faq.js +1 -1
- package/routes/public-analytics.js +23 -22
package/CHANGELOG.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
# 2.2.
|
1
|
+
# 2.2.21 -> PROD
|
2
|
+
- Increased list answers limit from 100 to 300
|
3
|
+
- enabled again waiting time in widgets endpoint unused
|
4
|
+
|
5
|
+
|
6
|
+
# 2.2.20
|
2
7
|
- disabled waiting time in widgets endpoint unused
|
3
8
|
|
4
9
|
# 2.2.18
|
5
10
|
- Router logger module enable with ROUTELOGGER_ENABLED=true
|
6
11
|
|
7
|
-
|
8
|
-
# 2.2.17 -> PROD
|
12
|
+
# 2.2.17
|
9
13
|
- Removed default fallback limit on parse reply
|
10
14
|
|
11
15
|
# 2.2.16
|
package/package.json
CHANGED
package/routes/faq.js
CHANGED
@@ -273,7 +273,7 @@ router.get('/', function (req, res, next) {
|
|
273
273
|
query.id_faq_kb = req.query.id_faq_kb;
|
274
274
|
}
|
275
275
|
|
276
|
-
var limit =
|
276
|
+
var limit = 300; // Number of request per page
|
277
277
|
|
278
278
|
if (req.query.limit) {
|
279
279
|
limit = parseInt(req.query.limit);
|
@@ -11,29 +11,30 @@ var winston = require('../config/winston');
|
|
11
11
|
//winston.debug(req.params);
|
12
12
|
//winston.debug("req.projectid", req.projectid);
|
13
13
|
|
14
|
-
res.json([]);
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
// res.json([]);
|
15
|
+
|
16
|
+
|
17
|
+
AnalyticResult.aggregate([
|
18
|
+
//last 4
|
19
|
+
{ $match: {"id_project":req.projectid, "createdAt" : { $gte : new Date((new Date().getTime() - (4 * 60 * 60 * 1000))) }} },
|
20
|
+
{ "$group": {
|
21
|
+
"_id": "$id_project",
|
22
|
+
"waiting_time_avg":{"$avg": "$waiting_time"}
|
23
|
+
}
|
24
|
+
},
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
26
|
+
])
|
27
|
+
// .cache(cacheUtil.longTTL, req.projectid+":analytics:query:waiting:avg:4hours")
|
28
|
+
.exec(function(err, result) {
|
29
|
+
|
30
|
+
if (err) {
|
31
|
+
winston.debug(err);
|
32
|
+
return res.status(500).send({success: false, msg: 'Error getting analytics.'});
|
33
|
+
}
|
34
|
+
//winston.debug(result);
|
35
|
+
|
36
|
+
res.json(result);
|
37
|
+
});
|
37
38
|
|
38
39
|
});
|
39
40
|
|