Skip to content

Commit 27aa1ac

Browse files
authored
Merge branch 'master' into ar2rsawseen/master2
2 parents d371bf9 + 1b24e47 commit 27aa1ac

51 files changed

Lines changed: 2958 additions & 1708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
password: ${{ secrets.DOCKERHUB_TOKEN }}
5555

5656
- name: Build and push Docker image
57-
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
57+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
5858
with:
5959
push: true
6060
file: ./Dockerfile-core

.github/workflows/docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
password: ${{ secrets.DOCKERHUB_TOKEN }}
3333

3434
- name: Build and push Docker image
35-
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
35+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
3636
with:
3737
context: .
3838
push: true
@@ -63,7 +63,7 @@ jobs:
6363
password: ${{ secrets.DOCKERHUB_TOKEN }}
6464

6565
- name: Build and push Docker image
66-
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
66+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
6767
with:
6868
push: true
6969
file: ./Dockerfile-api
@@ -94,7 +94,7 @@ jobs:
9494
password: ${{ secrets.DOCKERHUB_TOKEN }}
9595

9696
- name: Build and push Docker image
97-
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
97+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
9898
with:
9999
push: true
100100
file: ./Dockerfile-frontend
@@ -125,7 +125,7 @@ jobs:
125125
password: ${{ secrets.DOCKERHUB_TOKEN }}
126126

127127
- name: Build and push Docker image
128-
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
128+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
129129
with:
130130
push: true
131131
file: ./Dockerfile-core

.github/workflows/release_notice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: echo "$GITHUB_CONTEXT"
1515
- name: Send custom JSON data to Slack workflow
1616
id: slack
17-
uses: slackapi/slack-github-action@v2.0.0
17+
uses: slackapi/slack-github-action@v2.1.0
1818
with:
1919
# This data can be any valid JSON from a previous step in the GitHub Action
2020
payload: |

CHANGELOG.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11

22
## Version 25.03.x
3+
Enterprise Features:
4+
- [journey_engine] Record Event block added
5+
36
Fixes:
7+
- [core] Unifying alphabetical order for dropdowns with dashboard apps
8+
9+
Enterprise Fixes:
10+
- [content] Asset URL was wrongly constructed when user switches between apps
11+
- [ab-testing] Updates
12+
- Do not wait for result calculation when requesting experiments
13+
- Do not calculate result for completed experiments
14+
- [drill] [license] Shorten warning period from 14 days to 3 days
15+
16+
Dependencies:
17+
- Bump eslint-plugin-vue from 9.33.0 to 10.1.0
18+
- Bump lint-staged from 15.5.2 to 16.0.0
19+
- Bump nodemailer from 6.10.1 to 7.0.3
20+
- Bump puppeteer from 24.8.0 to 24.9.0
21+
- Bump sass from 1.87.0 to 1.89.0
22+
- Bump semver from 7.7.1 to 7.7.2
23+
- Bump supertest from 7.1.0 to 7.1.1
24+
25+
## Version 25.03.5
26+
Fixes:
27+
- [core] Changes for event omit script to validate data in new model and use countly-request.
28+
- [core] Changes to top events job. Fetching data from aggregated event totals.
29+
- [crashes] Fix unescaped SDK logs
430
- [feedback] Uniformize drawer internal name input texts
31+
- [feedback] Uniformize feedback widgets status tag
32+
- [localization] Fixed grammatical errors
533
- [star-rating] Added missing columns to Rating Widgets table edit
34+
- [star-rating] Allow bulk update of widget status
635
- [star-rating] Fix rating score and responses table sorting
736
- [ui] Fix alignment of drawers title and close icon
8-
- [heatmaps] Get heatmap data from new drill events collection
37+
- [UI] Remove white background from input character amount suffix
938

10-
Fixes:
11-
- [localization] Fixed grammatical errors
39+
Enterprise Fixes:
40+
- [heatmaps] Get heatmap data from new drill events collection
41+
- [retention] Fixed report loading
1242

1343
Dependencies:
1444
- Bump countly-sdk-web from 25.1.0 to 25.4.0

api/jobs/topEvents.js

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,49 @@ class TopEventsJob extends job.Job {
4444
}
4545

4646
/**
47-
* async
48-
* Get events count.
49-
* @param {Object} params - getEventsCount object
50-
* @param {String} params.collectionNameEvents - event collection name
51-
* @param {Object} params.ob - it contains all necessary info
52-
* @param {string} params.event - event name
53-
* @param {Object} params.data - dummy event data
54-
* @returns {Promise.<boolean>} true.
47+
*
48+
* @param {object} params - params object
49+
* @param {object} data - object where to collect data
50+
* @param {boolean} previous - if fetching for previous period
51+
* @returns {Promise} promise
5552
*/
56-
async getEventsCount(params) {
57-
const { collectionNameEvents, ob, data, event } = params;
53+
async fetchEventTotalCounts(params, data, previous) {
54+
let collectionName = "all";
55+
params.qstring.segmentation = "key";
5856
return await new Promise((resolve) => {
59-
countlyApi.data.fetch.getTimeObjForEvents(collectionNameEvents, ob, (doc) => {
57+
countlyApi.data.fetch.getTimeObjForEvents("events_data", params, {'id_prefix': params.app_id + "_" + collectionName + '_'}, function(doc) {
6058
countlyEvents.setDb(doc || {});
61-
const countProp = countlyEvents.getNumber("c", true);
62-
const sumProp = countlyEvents.getNumber("s", true);
63-
const durationProp = countlyEvents.getNumber("dur", true);
64-
data[event] = {};
65-
data[event].data = {
66-
count: countProp,
67-
sum: sumProp,
68-
duration: durationProp
69-
};
59+
60+
var dd = countlyEvents.getSegmentedData(params.qstring.segmentation);
61+
for (var z = 0; z < dd.length;z++) {
62+
var key = dd[z]._id;
63+
data[key] = data[key] || {};
64+
data[key].data = data[key].data || {};
65+
data[key].data.count = data[key].data.count || {"total": 0, "prev-total": 0, "change": "NA", "trend": "u"};
66+
if (previous) {
67+
data[key].data.count["prev-total"] = dd[z].c;
68+
}
69+
else {
70+
data[key].data.count.total = dd[z].c;
71+
}
72+
73+
data[key].data.sum = data[key].data.sum || {"total": 0, "prev-total": 0, "change": "NA", "trend": "u"};
74+
if (previous) {
75+
data[key].data.sum["prev-total"] = dd[z].s;
76+
}
77+
else {
78+
data[key].data.sum.total = dd[z].s;
79+
}
80+
81+
data[key].data.duration = data[key].data.duration || {"total": 0, "prev-total": 0, "change": "NA", "trend": "u"};
82+
if (previous) {
83+
data[key].data.duration["prev-total"] = dd[z].dur;
84+
}
85+
else {
86+
data[key].data.duration.total = dd[z].dur;
87+
}
88+
}
89+
//data.all = countlyEvents.getSegmentedData(params.qstring.segmentation);
7090
resolve(true);
7191
});
7292
});
@@ -204,10 +224,20 @@ class TopEventsJob extends job.Job {
204224
let prevTotalSum = 0;
205225
let totalDuration = 0;
206226
let prevTotalDuration = 0;
207-
for (const event of eventMap) {
208-
log.d(" getting event data for event: " + event + " (" + period + ")");
209-
const collectionNameEvents = this.eventsCollentions({ event, id: app._id });
210-
await this.getEventsCount({ collectionNameEvents, ob, data, event });
227+
228+
//Fetching totals for this period
229+
await this.fetchEventTotalCounts({ app_id: app._id, appTimezone: app.timezone, qstring: { period: period } }, data, false);
230+
var period2 = countlyCommon.getPeriodObj({appTimezone: app.timezone, qstring: {}}, period);
231+
var newPeriod = [period2.start - (period2.end - period2.start), period2.start];
232+
//Fetching totals for previous period
233+
await this.fetchEventTotalCounts({ app_id: app._id, appTimezone: app.timezone, qstring: { period: newPeriod } }, data, true);
234+
235+
236+
for (var event in data) {
237+
//Calculating trend
238+
var trend = countlyCommon.getPercentChange(data[event].data.count["prev-total"], data[event].data.count.total);
239+
data[event].data.count.change = trend.percent;
240+
data[event].data.count.trend = trend.trend;
211241
totalCount += data[event].data.count.total;
212242
prevTotalCount += data[event].data.count["prev-total"];
213243
totalSum += data[event].data.sum.total;

0 commit comments

Comments
 (0)