Skip to content

Commit 6e3d932

Browse files
committed
Merge branch 'next' into bugs/arturs-ui-fixes
# Conflicts: # plugins/plugins/frontend/public/javascripts/countly.views.js
2 parents 864d472 + 04db151 commit 6e3d932

File tree

157 files changed

+15703
-1555
lines changed

Some content is hidden

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

157 files changed

+15703
-1555
lines changed

.github/workflows/deploy.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Deploy
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master, next ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
deploy:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v2
23+
24+
- name: Enable command line
25+
shell: bash
26+
run: sudo bash ./bin/scripts/detect.init.sh
27+
28+
- name: Installing dependencies
29+
shell: bash
30+
run: npm install
31+
32+
- name: Deploy server
33+
shell: bash
34+
env:
35+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
36+
run: bash ./bin/scripts/deploy.sh
37+
38+
- name: Deploy documentation
39+
shell: bash
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: bash ./bin/scripts/generateDocs.sh

.github/workflows/docker-image.yml

+31
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,34 @@ jobs:
9999
push: true
100100
file: ./Dockerfile-frontend
101101
tags: countly/frontend:latest,countly/frontend:${{ steps.vars.outputs.tag }}
102+
103+
push_all:
104+
name: Push Countly Single-All Image
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Check out the repo
108+
uses: actions/checkout@v2
109+
110+
- name: Set output
111+
id: vars
112+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
113+
114+
- name: Check output
115+
env:
116+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
117+
run: |
118+
echo $RELEASE_VERSION
119+
echo ${{ steps.vars.outputs.tag }}
120+
121+
- name: Log in to Docker Hub
122+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
123+
with:
124+
username: ${{ secrets.DOCKERHUB_USERNAME }}
125+
password: ${{ secrets.DOCKERHUB_TOKEN }}
126+
127+
- name: Build and push Docker image
128+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
129+
with:
130+
push: true
131+
file: ./Dockerfile-core
132+
tags: countly/countly-core:latest,countly/countly-core:${{ steps.vars.outputs.tag }}

CHANGELOG.md

+144
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,142 @@
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+
53+
## Version 22.03.7
54+
55+
Fixes:
56+
- [compare] Adding tests
57+
- [members] Secure password reset token generation
58+
- [push] Allowing no platform results for migrated messages
59+
- [push] Migrating messages in batches
60+
- [remote-config] Fix for percentage bars
61+
- [upgrade] Remove even more files
62+
- [views] Fix view regeneration
63+
64+
Enterprise fixes:
65+
- [flows] ui fix
66+
67+
## Version 22.03.6
68+
69+
Fixes:
70+
- [compare] loading state fix
71+
- [ui] X-axis overflow handling changes
72+
- [upgrade] add drill indexes
73+
- [upgrade] do not upgrade new users that have permission object
74+
75+
Fixes Enterprise:
76+
- [attribution] added information toast when clicked show/hide button
77+
- [surveys] handling appearance null cases for sdk api
78+
- [users] add engagement score
79+
80+
## Version 22.03.5
81+
82+
Fixes:
83+
84+
- [core] Fixing logging issues
85+
- [crashes] Fixed app_version filter
86+
- [dashboards] Add dashboard name to audit logs when widget deleted
87+
- [dashboards] Show that app is deleted in widgets if app was deleted
88+
- [docker] Fixed dependency for HTML PDF on centos images
89+
- [grunt] Fixed production mode
90+
- [push] Destroy connection on credentials validation failure
91+
- [push] Fixing change streams in sender until driver update
92+
- [push] Longer muticasts
93+
- [push] Self signed proxy certificate support
94+
- [star-rating] Added custom rating symbol support
95+
96+
## Version 22.03.4
97+
98+
Fixes:
99+
- [push] added missing files
100+
101+
## Version 22.03.3
102+
103+
Fixes:
104+
- [crashes] defaults for optional fields
105+
- [dashboards] custom period for events widget
106+
- [dbviewer] fixed exporting of other databases
107+
- [frontend] fixed sorting of analytics tables
108+
- [populator] add push events
109+
- [push] credential validation fixes
110+
- [push] logger fixes
111+
- [push] remove send job
112+
- [report-manager] fixed localization strings
113+
114+
Enterprise Fixes:
115+
- [attribution] new ui transition
116+
- [drill] allow storing objects/arrays in event segments
117+
- [flows] correct view name mapping if start and end point selected for flow
118+
- [revenue] average paying customer data fixes and css improvement
119+
- [surveys] fix to show logo preview
120+
- [users] fixed decoding properties in user profiles
121+
122+
## Version 22.03.2
123+
124+
Fixes:
125+
- [crashes] fixed chart color
126+
- [crashes] fixed crashes stats
127+
- [populator] added control when input has a comma
128+
- [push] Revert "delete unsued preview push images"
129+
- [push] fixes in upgrade script
130+
- [push] making sure audience pusher works if there's no token
131+
- [push] proxy support, better configs & lots of fixes
132+
133+
Enterprise fixes:
134+
- [ab-testing] fixes for detail page to show variants
135+
- [revenue] session data included in the countly revenue
136+
- [surveys] changes to show device id if userName not present
137+
- [surveys] changes to show logo on edit
138+
- [surveys] fixed logo deletion
139+
1140
## Version 22.03.1
2141

3142
Enterprise fixes
@@ -29,6 +168,11 @@ Fixes:
29168
- [scripts] fixed Compiler Version for 22.03 upgrade and installation
30169
- [upgrade] remove old files
31170

171+
## Version 21.11.4
172+
173+
Fixes:
174+
- [members] Secure password reset token generation
175+
32176
## Version 21.11.3
33177

34178
Eneterprise Fixes:

Dockerfile-centos-api

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
2929
ln -s /usr/bin/node /usr/bin/nodejs && \
3030
\
3131
yum -y install centos-release-scl && \
32-
yum -y install openssl-devel devtoolset-7-gcc-c++ make git wget unzip make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools which && \
32+
yum -y install openssl-devel devtoolset-7-gcc-c++ make git wget unzip bzip2 make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools which && \
3333
source /opt/rh/devtoolset-7/enable && \
3434
\
3535
# modify standard distribution

Dockerfile-centos-frontend

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
2828
ln -s /usr/bin/node /usr/bin/nodejs && \
2929
\
3030
yum -y install centos-release-scl && \
31-
yum -y install openssl-devel devtoolset-7-gcc-c++ make git wget unzip make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools && \
31+
yum -y install openssl-devel devtoolset-7-gcc-c++ make git wget unzip bzip2 make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools && \
3232
source /opt/rh/devtoolset-7/enable && \
3333
\
3434
# modify standard distribution

Dockerfile-core

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
7272
chown -R countly:countly /opt/countly && \
7373
# cleanup
7474
npm remove -y --no-save mocha nyc should supertest && \
75-
apt-get -y remove build-essential libkrb5-dev git sqlite3 wget \
75+
apt-get -y remove build-essential libkrb5-dev sqlite3 wget \
7676
gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \
7777
apt-get -y install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
7878
apt-get clean && \

Gruntfile.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ module.exports = function(grunt) {
155155
'frontend/express/public/javascripts/countly/countly.version.history.js',
156156
'frontend/express/public/javascripts/countly/countly.analytics.js',
157157
'frontend/express/public/javascripts/countly/countly.views.js',
158+
'frontend/express/public/core/device-and-type/javascripts/countly.models.js',
159+
'frontend/express/public/core/device-and-type/javascripts/countly.views.js',
158160
'frontend/express/public/core/user-activity/javascripts/countly.models.js',
159161
'frontend/express/public/core/user-activity/javascripts/countly.views.js',
160162
'frontend/express/public/core/session-overview/javascripts/countly.models.js',
@@ -168,21 +170,18 @@ module.exports = function(grunt) {
168170
'frontend/express/public/core/report-manager/javascripts/countly.views.js',
169171
'frontend/express/public/core/app-resolution/javascripts/countly.views.js',
170172
'frontend/express/public/core/platform/javascripts/countly.views.js',
171-
'frontend/express/public/core/devices-and-types/javascripts/countly.models.js',
172-
'frontend/express/public/core/devices-and-types/javascripts/countly.views.js',
173173
'frontend/express/public/core/carrier/javascripts/countly.models.js',
174174
'frontend/express/public/core/carrier/javascripts/countly.views.js',
175-
'frontend/express/public/core/events/javascripts/countly.overview.models.js',
176-
'frontend/express/public/core/events/javascripts/countly.overview.views.js',
177175
'frontend/express/public/core/events/javascripts/countly.details.models.js',
178176
'frontend/express/public/core/events/javascripts/countly.details.views.js',
177+
'frontend/express/public/core/events/javascripts/countly.overview.models.js',
178+
'frontend/express/public/core/events/javascripts/countly.overview.views.js',
179179
'frontend/express/public/core/user-management/javascripts/countly.models.js',
180180
'frontend/express/public/core/user-management/javascripts/countly.views.js',
181181
'frontend/express/public/core/app-management/javascripts/countly.models.js',
182182
'frontend/express/public/core/app-management/javascripts/countly.views.js',
183183
'frontend/express/public/core/logs/javascripts/countly.views.js',
184184
'frontend/express/public/core/token-manager/javascripts/countly.views.js',
185-
'frontend/express/public/core/report-manager/javascripts/countly.views.js',
186185
'frontend/express/public/core/geo-countries/javascripts/countly.cities.models.js',
187186
'frontend/express/public/core/geo-countries/javascripts/countly.models.js',
188187
'frontend/express/public/core/user-analytics-overview/javascripts/countly.views.js',
@@ -224,6 +223,7 @@ module.exports = function(grunt) {
224223
'frontend/express/public/stylesheets/countly-checkbox/countly.checkbox.css',
225224
'frontend/express/public/javascripts/dom/tipsy/tipsy.css',
226225
'frontend/express/public/javascripts/dom/gridstack/gridstack.css',
226+
'frontend/express/public/javascripts/dom/gridstack/gridstack-extra.css',
227227
'frontend/express/public/javascripts/visualization/rickshaw/rickshaw.min.css',
228228
'frontend/express/public/javascripts/dom/pace/pace-theme-flash.css',
229229
'frontend/express/public/javascripts/dom/drop/drop-theme-countly.min.css',

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/parts/data/cache.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class DataStore {
5454
constructor(size, age, dispose, Cls) {
5555
this.size = size;
5656
this.age = age;
57-
this.lru = new LRU({max: size || Number.MAX_SAFE_INTEGER, maxAge: age || Number.MAX_SAFE_INTEGER, dispose: dispose, noDisposeOnSet: true, updateAgeOnGet: true});
57+
this.lru = new LRU({max: size || 10000, ttl: age || Number.MAX_SAFE_INTEGER, dispose: dispose, noDisposeOnSet: true, updateAgeOnGet: true});
5858
if (Cls) {
5959
this.Cls = Cls;
6060
this.Clas = require('../../../' + Cls[0])[Cls[1]];
@@ -588,7 +588,7 @@ class CacheMaster {
588588
this.operators[group] = {init, Cls, read, write, update, remove};
589589

590590
if (!size && size !== 0) {
591-
size = config.api && config.api.cache && config.api.cache[group] && config.api.cache[group].size !== undefined ? config.api.cache[group].size : Number.MAX_SAFE_INTEGER;
591+
size = config.api && config.api.cache && config.api.cache[group] && config.api.cache[group].size !== undefined ? config.api.cache[group].size : 10000;
592592
}
593593

594594
if (!age && age !== 0) {

api/parts/data/fetch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ fetch.getTotalUsersObjWithOptions = function(metric, params, options, callback)
14441444
}
14451445

14461446
if (groupBy === "users") {
1447-
options.db.collection("app_users" + params.app_id).find(match).count(function(error, appUsersDbResult) {
1447+
options.db.collection("app_users" + params.app_id).count(match, function(error, appUsersDbResult) {
14481448
if (!error && appUsersDbResult) {
14491449
callback([{ "_id": "users", "u": appUsersDbResult }]);
14501450
}
@@ -2045,8 +2045,8 @@ fetch.alljobs = async function(metric, params) {
20452045
fetch.jobDetails = async function(metric, params) {
20462046
const columns = ["schedule", "next", "finished", "status", "data", "duration"];
20472047
let sort = {};
2048+
const total = await common.db.collection('jobs').count({ name: params.qstring.name });
20482049
const cursor = common.db.collection('jobs').find({ name: params.qstring.name });
2049-
const total = await cursor.count();
20502050
sort[columns[params.qstring.iSortCol_0 || 0]] = (params.qstring.sSortDir_0 === "asc") ? 1 : -1;
20512051
cursor.sort(sort);
20522052
cursor.skip(Number(params.qstring.iDisplayStart || 0));

api/parts/mgmt/app_users.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ usersApi.count = function(app_id, query, callback) {
330330
query: query
331331
});
332332

333-
common.db.collection('app_users' + app_id).find(query).count(callback);
333+
common.db.collection('app_users' + app_id).count(query, callback);
334334
};
335335

336336
/**

api/parts/mgmt/users.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ usersApi.deleteOwnAccount = function(params) {
666666
verifyMemberArgon2Hash(params.member.email, params.qstring.password, (err, member) => {
667667
if (member) {
668668
if (member.global_admin) {
669-
common.db.collection('members').find({'global_admin': true}).count(function(err2, count) {
669+
common.db.collection('members').count({'global_admin': true}, function(err2, count) {
670670
if (err2) {
671671
console.log(err2);
672672
common.returnMessage(params, 400, 'Mongo error');
@@ -972,7 +972,7 @@ usersApi.fetchNotes = async function(params) {
972972
log.e(' got error while paring query notes request', e);
973973
}
974974
let count = 0;
975-
common.db.collection('notes').find(query).count(function(error, noteCount) {
975+
common.db.collection('notes').count(query, function(error, noteCount) {
976976
if (!error && noteCount) {
977977
count = noteCount;
978978
common.db.collection('notes').find(query)

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")

0 commit comments

Comments
 (0)