Skip to content

Commit 6779bf3

Browse files
committed
Merge branch 'master' into next
# Conflicts: # CHANGELOG.md
2 parents 60fb373 + 220b55a commit 6779bf3

File tree

14 files changed

+600
-179
lines changed

14 files changed

+600
-179
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ log/
4444
log/supervisord/
4545
plugins/plugins.json.*
4646
.sdk
47-
dump
47+
dump
48+
dist/

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Version 25.03.x
22
Features:
3+
- Add ability to allow multiple CORS per app for web apps
4+
- Add app id and name as view segment for self-tracking
35
- [alerts] alerts table default order should be by creation time newest at the top
46
- [core] allow tracking Countly dashboard usage with Countly
57
- [sdk] Improved and added new Server Config options
@@ -8,6 +10,11 @@ Enterprise Features:
810
- [journey_engine] Editing/Deleting/Duplication of blocks and version management
911
- [cohorts] [funnels] [ai-assistants] Add cohorts and funnels assistant
1012

13+
Dependencies:
14+
- Bump body-parser from 1.20.3 to 2.2.0
15+
- Bump moment-timezone from 0.5.47 to 0.5.48
16+
- Bump supertest from 7.0.0 to 7.1.0
17+
1118
## Version 25.03.3
1219
Fixes:
1320
- [content_builder] Reformulate asset library and add asset drag and drop upload to builder input

api/lib/countly.common.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
* @module "api/lib/countly.common"
44
*/
55

6+
/**
7+
* @typedef {import('moment-timezone')} MomentTimezone
8+
*/
9+
610
/** @lends module:api/lib/countly.common */
711
var countlyCommon = {},
12+
/**
13+
* Reference to momentjs
14+
* @type {MomentTimezone} moment
15+
*/
816
moment = require('moment-timezone'),
917
underscore = require('underscore');
1018

@@ -17,8 +25,8 @@ var _period = "hour",
1725

1826
/**
1927
* Returns array with unique ticks for period
20-
* @param {moment} startTimestamp - start of period
21-
* @param {moment} endTimestamp - end of period
28+
* @param {MomentTimezone} startTimestamp - start of period
29+
* @param {MomentTimezone} endTimestamp - end of period
2230
* @returns {array} unique array ticks for period
2331
**/
2432
/*function getTicksBetween(startTimestamp, endTimestamp) {
@@ -46,8 +54,8 @@ var _period = "hour",
4654

4755
/**
4856
* Returns array with more generalized unique ticks for period
49-
* @param {moment} startTimestamp - start of period
50-
* @param {moment} endTimestamp - end of period
57+
* @param {MomentTimezone} startTimestamp - start of period
58+
* @param {MomentTimezone} endTimestamp - end of period
5159
* @returns {array} unique array ticks for period
5260
**/
5361
/*function getTicksCheckBetween(startTimestamp, endTimestamp) {
@@ -355,7 +363,7 @@ function fixTimestampToMilliseconds(ts) {
355363

356364
/**
357365
* Returns a period object used by all time related data calculation functions
358-
* @param {moment} prmPeriod period to be calculated (optional)
366+
* @param {MomentTimezone} prmPeriod period to be calculated (optional)
359367
* @param {string} bucket - daily or monthly. If bucket is set, period will be modified to fit full months or days
360368
* @returns {timeObject} time object
361369
**/

api/utils/common.js

Lines changed: 101 additions & 95 deletions
Large diffs are not rendered by default.

api/utils/requestProcessor.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* @module api/utils/requestProcessor
44
*/
55

6+
/**
7+
* @typedef {import('../../types/requestProcessor').Params} Params
8+
* @typedef {import('../../types/common').TimeObject} TimeObject
9+
*/
10+
611
const Promise = require('bluebird');
712
const url = require('url');
813
const common = require('./common.js');
@@ -65,7 +70,7 @@ const reloadConfig = function() {
6570
/**
6671
* Default request processing handler, which requires request context to operate. Check tcp_example.js
6772
* @static
68-
* @param {params} params - for request context. Minimum needed properties listed
73+
* @param {Params} params - for request context. Minimum needed properties listed
6974
* @param {object} params.req - Request object, should not be empty and should contain listed params
7075
* @param {string} params.req.url - Endpoint URL that you are calling. May contain query string.
7176
* @param {object} params.req.body - Parsed JSON object with data (same name params will overwrite query string if anything provided there)
@@ -103,9 +108,9 @@ const processRequest = (params) => {
103108
paths = urlParts.pathname.split("/");
104109
/**
105110
* Main request processing object containing all information shared through all the parts of the same request
106-
* @typedef params
107-
* @type {object}
108-
* @global
111+
* typedef params
112+
* type {object}
113+
* global
109114
* @property {string} href - full URL href
110115
* @property {http.ServerResponse} res - The HTTP response object
111116
* @property {http.IncomingMessage} req - The HTTP request object
@@ -182,7 +187,7 @@ const processRequest = (params) => {
182187
* @property {Object} [member.permission.d[app_id].allowed] - Object containing allowed delete permissions for the app
183188
* @property {Object} member.eventList - Object containing event collections with replaced app names
184189
* @property {Object} member.viewList - Object containing view collections with replaced app names
185-
* @property {timeObject} time - Time object for the request
190+
* @property {TimeObject} time - Time object for the request
186191
* @property {string} request_hash - Hash of the request data
187192
* @property {string} [previous_session] - ID of the user's previous session
188193
* @property {number} [previous_session_start] - Start timestamp of the user's previous session
@@ -3747,7 +3752,7 @@ function processUser(params, initiator, done, try_times) {
37473752
/**
37483753
* Function to fetch app user from db
37493754
* @param {object} params - params object
3750-
* @returns {promise} - user
3755+
* @returns {Promise} - user
37513756
*/
37523757
const fetchAppUser = (params) => {
37533758
return new Promise((resolve) => {

frontend/express/public/javascripts/countly/vue/templates/drawer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h3 :data-test-id="testId + '-header-title'" class="cly-vue-drawer__title-header
6464
</div>
6565
<div class="cly-vue-drawer__steps-container" v-scroll-shadow :class="{'is-multi-step':isMultiStep}">
6666
<div class="bu-columns bu-is-gapless bu-is-mobile" v-if="currentScreenMode === 'full'">
67-
<div class="bu-column bu-is-12">
67+
<div class="bu-column bu-is-12" :data-test-id="testId + '-header-title'">
6868
<h3>{{title}}</h3>
6969
</div>
7070
</div>

frontend/express/views/dashboard.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,10 +2043,10 @@ <h4><a href="#/analytics/events/key/{{encodeURIComponent this.name}}">{{this.nam
20432043
Countly2.track_sessions();
20442044

20452045
//track pageviews automatically
2046-
Countly2.track_pageview(Countly.getViewName());
2046+
Countly2.track_pageview(Countly.getViewName(), null, {app_id:countlyCommon.ACTIVE_APP_ID, app_name:countlyGlobal.apps[countlyCommon.ACTIVE_APP_ID]?.name});
20472047

20482048
$(window).on('hashchange', function() {
2049-
Countly2.track_pageview(Countly.getViewName());
2049+
Countly2.track_pageview(Countly.getViewName(), null, {app_id:countlyCommon.ACTIVE_APP_ID, app_name:countlyGlobal.apps[countlyCommon.ACTIVE_APP_ID]?.name});
20502050
});
20512051

20522052
//display in app messages

0 commit comments

Comments
 (0)