Skip to content

Commit 7121121

Browse files
committed
Merge branch 'master' into next
2 parents 93e38b8 + 519da22 commit 7121121

File tree

40 files changed

+813
-247
lines changed

40 files changed

+813
-247
lines changed

CHANGELOG.md

+52
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## Version 22.03.10
2+
3+
Fixes:
4+
- [dashboards] The graph tooltip should overflow from the widget's bounding box
5+
- [push] Expired credentials case
6+
- [ui] Pressing enter refreshes the page
7+
8+
Enterprise fixes:
9+
- [auth_plugins] Remove old UI artifacts
10+
- [drill] View regeneration from drill data
11+
- [surveys] Fixed tooltip localization
12+
13+
## Version 22.03.9
14+
15+
Fixes:
16+
- [batcher] more no fallback errors
17+
- [compliance-hub] Table column design fix
18+
- [push] Arrays for sent messages
19+
- [push] Method to get notifications sent to a particular user
20+
- [push] Missing audit logs calls
21+
- [push] Missing capping / sleeping support
22+
- [push] Parsing only string args for legacy api
23+
- [push] Set test pushes as prod in upgrade script
24+
- [ui] Chart label scaling issue fixed
25+
- [versions] Showing mongodb version in versions view
26+
- [views] Using isoWeek for unique views values
27+
28+
Enterprise Fixes:
29+
- [ab-testing] fix of undefined array
30+
- [attribution] Added null check for unpopulated data case
31+
- [attribution] Fixed the issue where metadata was not displayed in segments
32+
- [users] Always translate surveys
33+
- [users] Fix for sorting session table
34+
- [users] Handled formating case for numbers
35+
- [users] Missing tooltip added
36+
- [users] Optimize calculating event count for session for single user in aggregation pipeline
37+
- [white-labeling] Default button color code changed
38+
39+
## Version 22.03.8
40+
41+
Fixes:
42+
- [dependency] update dependencies
43+
- [ui] fixed scaling issues and x-axis labels on charts
44+
- [ui] tab title should update when switching app types
45+
46+
Enterprise fixes:
47+
- [crashes-jira] new UI integration
48+
- [funnels] save button's label changed for edit case.
49+
- [retention_segments] fixed retention filter query
50+
- [users] fixed export query
51+
- [users] fixed query bookmark
52+
153
## Version 22.03.7
254

355
Fixes:

api/parts/data/batcher.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class InsertBatcher {
5151
* @param {string} collection - name of the collection for which to write data
5252
*/
5353
async flush(db, collection) {
54-
var no_fallback_errors = [10334, 17419];
54+
var no_fallback_errors = [10334, 17419, 14, 56];
5555
if (this.data[db][collection].length) {
5656
var docs = this.data[db][collection];
5757
this.data[db][collection] = [];
@@ -188,7 +188,7 @@ class WriteBatcher {
188188
* @param {string} collection - name of the collection for which to write data
189189
*/
190190
async flush(db, collection) {
191-
var no_fallback_errors = [10334, 17419];
191+
var no_fallback_errors = [10334, 17419, 14, 56];
192192
if (Object.keys(this.data[db][collection]).length) {
193193
var queries = [];
194194
for (let key in this.data[db][collection]) {

api/utils/common.js

+1
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ common.initTimeObj = function(appTimezone, reqTimestamp) {
637637
daily: tmpMoment.format("YYYY.M.D"),
638638
hourly: tmpMoment.format("YYYY.M.D.H"),
639639
weekly: Math.ceil(tmpMoment.format("DDD") / 7),
640+
weeklyISO: tmpMoment.isoWeek(),
640641
month: tmpMoment.format("M"),
641642
day: tmpMoment.format("D"),
642643
hour: tmpMoment.format("H")

api/utils/requestProcessor.js

+28-16
Original file line numberDiff line numberDiff line change
@@ -2447,22 +2447,34 @@ const processRequest = (params) => {
24472447
//load previos version info if exist
24482448
loadFsVersionMarks(function(errFs, fsValues) {
24492449
loadDbVersionMarks(function(errDb, dbValues) {
2450-
var response = {};
2451-
if (errFs) {
2452-
response.fs = errFs;
2453-
}
2454-
else {
2455-
response.fs = fsValues;
2456-
}
2457-
if (errDb) {
2458-
response.db = errDb;
2459-
}
2460-
else {
2461-
response.db = dbValues;
2462-
}
2463-
response.pkg = packageJson.version || "";
2464-
var statusCode = (errFs && errDb) ? 400 : 200;
2465-
common.returnMessage(params, statusCode, response);
2450+
//load mongodb version
2451+
common.db.command({ buildInfo: 1 }, function(errorV, info) {
2452+
var response = {};
2453+
if (errorV) {
2454+
response.mongo = errorV;
2455+
}
2456+
else {
2457+
if (info && info.version) {
2458+
response.mongo = info.version;
2459+
}
2460+
}
2461+
2462+
if (errFs) {
2463+
response.fs = errFs;
2464+
}
2465+
else {
2466+
response.fs = fsValues;
2467+
}
2468+
if (errDb) {
2469+
response.db = errDb;
2470+
}
2471+
else {
2472+
response.db = dbValues;
2473+
}
2474+
response.pkg = packageJson.version || "";
2475+
var statusCode = (errFs && errDb) ? 400 : 200;
2476+
common.returnMessage(params, statusCode, response);
2477+
});
24662478
});
24672479
});
24682480
});

bin/upgrade/22.03/scripts/push_all_things.js

+48-9
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ console.log('Migrating push plugin data');
77

88
plugins.dbConnection().then(async db => {
99
common.db = db;
10-
let push = await db.collection('push').findOne();
11-
if (push && !process.env.FORCE_REPEAT) {
12-
return console.log('Migrating push plugin data: no migration needed as there\'s already data in "push" collection');
13-
}
10+
// let push = await db.collection('push').findOne();
11+
// if (push && !process.env.FORCE_REPEAT) {
12+
// return console.log('Migrating push plugin data: no migration needed as there\'s already data in "push" collection');
13+
// }
1414

1515
await db.createCollection('push').catch(() => {
1616
console.log('push collection already exists');
@@ -170,25 +170,61 @@ plugins.dbConnection().then(async db => {
170170
let obj = {};
171171
if (Array.isArray(doc.msgs)) {
172172
doc.msgs.forEach(msg => {
173+
let id, date;
173174
if (Array.isArray(msg)) {
174-
obj[msg[0]] = msg[1];
175+
id = msg[0];
176+
date = msg[1];
175177
}
176178
else if (common.dbext.isoid(msg)) {
177-
obj[msg] = new Date(2018, 0, 1, 1).getTime();
179+
id = msg;
180+
date = new Date(2018, 0, 1, 1).getTime();
181+
}
182+
if (obj[id]) {
183+
if (obj[id].indexOf(date) === -1) {
184+
obj[id].push(date);
185+
}
186+
}
187+
else {
188+
obj[id] = [date];
178189
}
179190
});
180191
}
181192
else if (doc.msgs && doc.msgs['0']) {
182193
for (let k in doc.msgs) {
183-
let msg = doc.msgs[k];
194+
let id,
195+
date,
196+
msg = doc.msgs[k];
184197
if (Array.isArray(msg)) {
185-
obj[msg[0]] = msg[1];
198+
id = msg[0];
199+
date = msg[1];
186200
}
187201
else if (common.dbext.isoid(msg)) {
188-
obj[msg] = new Date(2018, 0, 1, 1).getTime();
202+
id = msg;
203+
date = new Date(2018, 0, 1, 1).getTime();
204+
}
205+
if (obj[id]) {
206+
if (obj[id].indexOf(date) === -1) {
207+
obj[id].push(date);
208+
}
209+
}
210+
else {
211+
obj[id] = [date];
189212
}
190213
}
191214
}
215+
else {
216+
let needsFix = false,
217+
fixed = {};
218+
for (let mid in doc.msgs) {
219+
if (typeof doc.msgs[mid] === 'number') {
220+
needsFix = true;
221+
}
222+
fixed[mid] = typeof doc.msgs[mid] === 'number' ? [doc.msgs[mid]] : doc.msgs[mid];
223+
}
224+
if (needsFix) {
225+
obj = fixed;
226+
}
227+
}
192228

193229
if (Object.keys(obj).length) {
194230
await add({updateOne: {filter: {_id: doc._id}, update: {$set: {msgs: obj}}}});
@@ -241,6 +277,9 @@ plugins.dbConnection().then(async db => {
241277
type = queue.substr(queue.lastIndexOf('_') + 1),
242278
p = type[0],
243279
f = type[1];
280+
if ((p === 'a' || p === 'h') && f === 't') {
281+
f = 'p';
282+
}
244283
for await (const doc of stream) {
245284
await add({
246285
_id: common.dbext.oidWithDate(Math.floor(doc.d / 1000)),

frontend/express/public/core/session-overview/templates/session-overview.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ <h2> {{i18n('session-overview.title')}} </h2>
99
<cly-main>
1010
<cly-date-picker-g class="session-overview-date-picker-container"></cly-date-picker-g>
1111
<cly-section>
12-
<cly-chart-line :option="sessionOverviewOptions" :height="400" v-loading="isLoading" :force-loading="isLoading" :legend="legend"></cly-chart-line>
12+
<cly-chart-line xAxisLabelOverflow="unset" :option="sessionOverviewOptions" :height="400" v-loading="isLoading" :force-loading="isLoading" :legend="legend"></cly-chart-line>
1313
</cly-section>
1414
<cly-section>
15-
<cly-datatable-n :rows="sessionOverviewRows" :resizable="true" :force-loading="isLoading" >
15+
<cly-datatable-n :rows="sessionOverviewRows" :resizable="true" :force-loading="isLoading">
1616
<template v-slot="scope">
1717
<el-table-column prop="date" :label="i18n('common.date')" :sortable="true" :sort-method="sortDates">
1818
</el-table-column>

frontend/express/public/javascripts/countly/countly.views.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,14 @@ window.VersionHistoryView = countlyView.extend({
501501
},
502502
renderCommon: function(isRefresh) {
503503

504-
var tableData = countlyVersionHistoryManager.getData(true) || {fs: [], db: [], pkg: ""};
504+
var tableData = countlyVersionHistoryManager.getData(true) || {fs: [], db: [], pkg: "", "mongo": ""};
505505

506506
//provide template data
507507
this.templateData = {
508508
"db-title": jQuery.i18n.map["version_history.page-title"] + " (DB)",
509509
"fs-title": jQuery.i18n.map["version_history.page-title"] + " (FS)",
510-
"package-version": jQuery.i18n.map["version_history.package-version"] + ": " + tableData.pkg
510+
"package-version": jQuery.i18n.map["version_history.package-version"] + ": " + tableData.pkg,
511+
"mongo-version": "MongDb version:" + tableData.mongo
511512
};
512513

513514
/**

0 commit comments

Comments
 (0)