Skip to content

Commit f9849fd

Browse files
committed
Merge branch 'release.24.12' into next
2 parents 433041d + 38107a5 commit f9849fd

File tree

10 files changed

+103
-291
lines changed

10 files changed

+103
-291
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Version 24.12.x
2+
23
Fixes:
34
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
45
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition
@@ -9,6 +10,10 @@ Features:
910
Dependencies:
1011
- Bump express from 4.21.1 to 4.21.2
1112
- Bump mocha from 10.2.0 to 10.8.2
13+
- Bump sass from 1.81.0 to 1.83.1
14+
- Bump countly-sdk-nodejs from 24.10.0 to 24.10.1
15+
- Bump express-rate-limit from 7.4.1 to 7.5.0
16+
- Bump puppeteer from 23.10.4 to 23.11.1
1217

1318
## Version 24.12
1419
Features:

api/utils/common.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,13 @@ common.getDate = function(timestamp, timezone) {
693693
* @returns {number} current day of the year
694694
*/
695695
common.getDOY = function(timestamp, timezone) {
696-
var endDate = (timestamp) ? moment.unix(timestamp * 1000) : moment();
696+
var endDate;
697+
if (timestamp && timestamp.toString().length === 13) {
698+
endDate = (timestamp) ? moment.unix(timestamp / 1000) : moment();
699+
}
700+
else {
701+
endDate = (timestamp) ? moment.unix(timestamp) : moment();
702+
}
697703

698704
if (timezone) {
699705
endDate.tz(timezone);

frontend/express/app.js

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
// Set process name
77
process.title = "countly: dashboard node " + process.argv[1];
88

9+
var fs = require('fs');
10+
var path = require('path');
11+
var IS_FLEX = false;
12+
13+
if (fs.existsSync(path.resolve('/opt/deployment_env.json'))) {
14+
var deploymentConf = fs.readFileSync('/opt/deployment_env.json', 'utf8');
15+
try {
16+
if (JSON.parse(deploymentConf).DEPLOYMENT_ID) {
17+
IS_FLEX = true;
18+
}
19+
}
20+
catch (e) {
21+
IS_FLEX = false;
22+
}
23+
}
24+
925
var versionInfo = require('./version.info'),
1026
pack = require('../../package.json'),
1127
COUNTLY_VERSION = versionInfo.version,
@@ -27,8 +43,6 @@ var versionInfo = require('./version.info'),
2743
}
2844
}),
2945
crypto = require('crypto'),
30-
fs = require('fs'),
31-
path = require('path'),
3246
jimp = require('jimp'),
3347
flash = require('connect-flash'),
3448
cookieParser = require('cookie-parser'),
@@ -66,7 +80,13 @@ var COUNTLY_NAMED_TYPE = "Countly Lite v" + COUNTLY_VERSION;
6680
var COUNTLY_TYPE_CE = true;
6781
var COUNTLY_TRIAL = (versionInfo.trial) ? true : false;
6882
var COUNTLY_TRACK_TYPE = "OSS";
69-
if (versionInfo.footer) {
83+
84+
if (IS_FLEX) {
85+
COUNTLY_NAMED_TYPE = "Countly v" + COUNTLY_VERSION;
86+
COUNTLY_TYPE_CE = false;
87+
COUNTLY_TRACK_TYPE = "Flex";
88+
}
89+
else if (versionInfo.footer) {
7090
COUNTLY_NAMED_TYPE = versionInfo.footer;
7191
COUNTLY_TYPE_CE = false;
7292
if (COUNTLY_NAMED_TYPE === "Countly Cloud") {
@@ -907,8 +927,9 @@ Promise.all([plugins.dbConnection(countlyConfig), plugins.dbConnection("countly_
907927
countly_tracking = plugins.isPluginEnabled('tracker') ? true : plugins.getConfig('frontend').countly_tracking,
908928
countly_domain = plugins.getConfig('api').domain,
909929
licenseNotification, licenseError;
930+
var isLocked = false;
910931
configs.export_limit = plugins.getConfig("api").export_limit;
911-
app.loadThemeFiles(configs.theme, function(theme) {
932+
app.loadThemeFiles(configs.theme, async function(theme) {
912933
if (configs._user.theme) {
913934
res.cookie("theme", configs.theme);
914935
}
@@ -922,6 +943,13 @@ Promise.all([plugins.dbConnection(countlyConfig), plugins.dbConnection("countly_
922943
if (member.upgrade) {
923944
countlyDb.collection('members').update({"_id": member._id}, {$unset: {upgrade: ""}}, function() {});
924945
}
946+
if (IS_FLEX) {
947+
let locked = await countlyDb.collection('mycountly').findOne({_id: 'lockServer'});
948+
if (locked?.isLocked === true) {
949+
isLocked = true;
950+
}
951+
952+
}
925953

926954
if (req.session.licenseError) {
927955
licenseError = req.session.licenseError;
@@ -989,6 +1017,8 @@ Promise.all([plugins.dbConnection(countlyConfig), plugins.dbConnection("countly_
9891017
helpCenterLink: COUNTLY_HELPCENTER_LINK,
9901018
featureRequestLink: COUNTLY_FEATUREREQUEST_LINK,
9911019
},
1020+
mycountly: IS_FLEX,
1021+
isLocked: isLocked,
9921022
};
9931023

9941024

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
types: Object.keys(app.appTypes),
3838
appTemplates: appTemplates,
3939
populatorProgress: 0,
40-
populatorMaxTime: 60,
40+
populatorMaxTime: 30,
4141
isPopulatorFinished: false,
4242
isCountlyEE: countlyGlobal.plugins.includes('drill'),
4343
selectedAppTemplate: null,

0 commit comments

Comments
 (0)