Skip to content

Commit c4cc5c2

Browse files
authored
Merge pull request #2 from Countly/master
mrg
2 parents f3ddda5 + 06040a6 commit c4cc5c2

File tree

79 files changed

+2543
-857
lines changed

Some content is hidden

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

79 files changed

+2543
-857
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ branches:
1111
before_install:
1212
- sudo apt-get remove -y mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
1313
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz -O /tmp/mongodb.tgz
14-
- tar -xvf /tmp/mongodb.tgz
14+
- tar -xf /tmp/mongodb.tgz
1515
- mkdir /tmp/data
1616
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --dbpath /tmp/data --bind_ip 127.0.0.1 --logpath ${PWD}/mongod.log &> /dev/null &
1717
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,90 @@
1+
## Version 20.04.1
2+
3+
**Fixes**
4+
* [api] make sure location is string
5+
* [api] skip empty bulk requests
6+
* [cmd] fix logging of upgrade commands
7+
* [configuration] plugin settings in app managament treat number like number
8+
* [crashes] log bulk error on crash users upsert
9+
* [dbviewer] fixed projection problem
10+
* [enterpriseinfo] more space to login area
11+
* [frontend] fix empty template load in application management
12+
* [frontend] fixed admins accessing applications section
13+
* [frontend] fixed error when checking user_of rights
14+
* [frontend] period parsing fixes
15+
* [members] maintain backwards compatability for api key validation
16+
* [plugin-upload] fix file type check
17+
* [populator] allow providing single digit values as custom user properties in templates
18+
* [push] fixing unhandled rejection on delete of notification with invalid id
19+
* [reportmanager] delete long tasks on app delete
20+
* [server-stats] punchcard comply with rights access
21+
* [star-rating] fix dialog to work with checksum enabled apps
22+
* [star-rating] fixed integration popup problem
23+
* [star-ratings] fixed comments tab sorting problem
24+
* [systemlogs] fix exports script for new driver version
25+
* [views] correct localization based on app type
26+
* [views] fixed incorrect result when searching for specific views
27+
28+
**Enterprise fixes**
29+
* [ab-testing] fixed user merging logic for ab testing experiments
30+
* [ab-testing] shallow copy bug fix
31+
* [attribution] correctly calculating campaign level aggregated data
32+
* [cohorts] do not crash if cohort does not exist for widget
33+
* [cohorts] moved back to master process for usage in push campaigns
34+
* [concurrent_users] handling metric labels overflow
35+
* [dashboards] fixed double zoom on drill widget period switch
36+
* [drill] correctly check query type for api parameter
37+
* [drill] fixed date processing error in some cases
38+
* [drill] fixed duration formatting for BY queryes and dashboard widgets
39+
* [drill] fixed recording orientation key
40+
* [drill] limit line count in graph based on settings color count for BY queries
41+
* [drill] proper event key escaping/unescaping processing
42+
* [drill] use BY limit from configuration correctly
43+
* [flows] use view display name in flow diagram
44+
* [formulas] correctly regenerate formulas data in report manager
45+
* [formulas] fixed NaN/no data issue for weekly buckets
46+
* [funnels] fixed calculating funnel data for past periods
47+
* [loyalty] fix segmentation filter
48+
* [performance-monitoring] apm tables sorting fixes
49+
* [performance-monitoring] fix drill query period
50+
* [performance-monitoring] tabs navigation bug fix
51+
* [performance-monitoring] unknown value fix
52+
* [star-rating] drill icon will only appear on ratings tab
53+
54+
**Improvements**
55+
* [compare] increased app/event compare limit to 20
56+
* [db] support for mongodb DNS seed list connection string
57+
* [frontend] add links to events in event overview
58+
* [frontend] remove password field when creating users from Global admin
59+
* [ip_store] store ip address as custom user property (disabled by default)
60+
* [logger] allow searching for request contents in search field
61+
* [logger] register data for tokens on top level
62+
* [logger] register requests with ms precision
63+
* [performance-monitoring] network response latency overall percentages and breakdown by country
64+
* [populator] add more template based views with heatmap data for web app type
65+
* [remote-config] add support for does not contain
66+
* [reportmanager] display errors in the report manager table
67+
68+
**Enterprise Improvements**
69+
* [block] do not require segmentation for blocking events
70+
* [funnels] display readable stepnames for custom dashboards widgets
71+
* [users] display search input if any value is provided in it
72+
* [users] make segments and segment values searchable and exportable in event timeline
73+
74+
**Development related**
75+
* [api] provide a way to bypass checksum check for programmatic request
76+
* [cmd] add new plugin creation command
77+
* [docker] Invalid A/B testing model location for debian
78+
* [docker] Removing unnecessary plugins
79+
* [docker] fixed disappearing timzeone
80+
* [docs] comment fixes and documentation generation stucture
81+
* [frontend] allow skipping columns from export
82+
* [plugins] ensure events propagate to all plugins on single plugin failure
83+
* [scripts] single mongodb installation script (that can be used standalone)
84+
* [shellcheck] fixes and CI checks
85+
* [tests] increased timeouts and removed ambigiousness
86+
87+
188
## Version 20.04
289

390
**Fixes**

Dockerfile-api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ USER root
1313
## Tini
1414
ENV COUNTLY_CONTAINER="api" \
1515
COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \
16+
COUNTLY_CONFIG_API_API_WORKERS="1" \
1617
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
1718
TINI_VERSION="0.18.0"
1819

Dockerfile-centos-api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ USER root
1313
## Tini
1414
ENV COUNTLY_CONTAINER="api" \
1515
COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \
16+
COUNTLY_CONFIG_API_API_WORKERS="1" \
1617
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
1718
TINI_VERSION="0.18.0" \
1819
PATH="/opt/rh/rh-nodejs10/root/usr/bin:${PATH}"

api/lib/countly.common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function getPeriodObject() {
105105
}
106106
catch (SyntaxError) {
107107
console.log("period JSON parse failed");
108-
_period = "month";
108+
_period = "30days";
109109
}
110110
}
111111

@@ -1865,7 +1865,7 @@ countlyCommon.decode = function(str) {
18651865
* @param {(string|string[]|number[])} defaultPeriod - default period value in case it's not supplied in the params
18661866
* @returns {module:api/lib/countly.common.periodObj} period object
18671867
*/
1868-
countlyCommon.getPeriodObj = function(params, defaultPeriod = "month") {
1868+
countlyCommon.getPeriodObj = function(params, defaultPeriod = "30days") {
18691869
let appTimezone = params.appTimezone || (params.app && params.app.timezone);
18701870

18711871
params.qstring.period = params.qstring.period || defaultPeriod;

api/parts/data/usage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ usage.processLocation = function(params) {
230230

231231
if ('location' in params.qstring) {
232232
if (params.qstring.location) {
233-
var coords = params.qstring.location.split(',');
233+
var coords = (params.qstring.location + "").split(',');
234234
if (coords.length === 2) {
235235
var lat = parseFloat(coords[0]),
236236
lon = parseFloat(coords[1]);

api/parts/jobs/manager.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,13 @@ class Manager {
353353
**/
354354
schedule(job) {
355355
if (job.scheduleObj) {
356-
var schedule = typeof job.scheduleObj === 'string' ? later.parse.text(job.scheduleObj) : job.scheduleObj,
357-
nextFrom = new Date(job.next);
358-
var next = later.schedule(schedule).next(2, nextFrom);
356+
var strict = job.strict !== null && job.strict !== undefined,
357+
schedule = typeof job.scheduleObj === 'string' ? later.parse.text(job.scheduleObj) : job.scheduleObj,
358+
nextFrom = strict ? new Date(job.next) : new Date(),
359+
next = later.schedule(schedule).next(2, nextFrom);
360+
359361
if (next && next.length > 1) {
360-
if (job.strict !== null && job.strict !== undefined) {
362+
if (strict) {
361363
// for strict jobs we're going to repeat all missed tasks up to current date after restart
362364
// for non-strict ones, we want to start from current date
363365
while (next[1].getTime() < Date.now()) {
@@ -595,7 +597,7 @@ class Manager {
595597
n = (this.running[job.name] || []).length,
596598
can = c === 0 || (n + count) <= c;
597599
if (!can) {
598-
log.i('Hit concurrency limit on %j: %d is running out of limit %d, requested to run %d', job._id, n, c, count);
600+
log.i('Hit concurrency limit on %j: %d is running out of limit %d, requested to run %d, running %j', job._id, n, c, count, this.running[job.name]);
599601
}
600602
return can;
601603
}

api/parts/mgmt/app_users.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ var spawn = cp.spawn; //for calling comannd line
1515
const fse = require('fs-extra');
1616
var crypto = require('crypto');
1717

18+
var cohorts;
19+
try {
20+
cohorts = require("../../../plugins/cohorts/api/parts/cohorts.js");
21+
}
22+
catch (ex) {
23+
cohorts = null;
24+
}
25+
1826
/**
1927
* Create new app_user document. Creates uid if one is not provided
2028
* @param {string} app_id - _id of the app
@@ -1026,6 +1034,11 @@ usersApi.loyalty = function(params) {
10261034
}
10271035
}
10281036

1037+
if (cohorts) {
1038+
var cohortQuery = cohorts.preprocessQuery(query);
1039+
query = Object.assign(query, cohortQuery);
1040+
}
1041+
10291042
// Time
10301043
const ts = (new Date()).getTime();
10311044
const sevenDays = 7 * 24 * 60 * 60 * 1000;

api/parts/mgmt/apps.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,13 @@ appsApi.updateAppPlugins = function(params) {
462462
reject(err2);
463463
}
464464
else if (changes) {
465-
resolve({[k]: changes});
465+
let err = changes.filter(c => c.status === 'rejected')[0];
466+
if (err) {
467+
reject(err.reason);
468+
}
469+
else {
470+
resolve({[k]: changes.map(c => c.value)});
471+
}
466472
}
467473
else {
468474
log.d('Updating %s plugin config for app %s in db: %j', k, params.qstring.app_id, params.qstring.args[k]);

api/parts/mgmt/mail.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ else {
5656
* @param {function} callback - function to call when its done
5757
**/
5858
mail.sendMail = function(message, callback) {
59+
message.from = config.mail && config.mail.strings && config.mail.strings.from || message.from || "Countly";
5960
mail.smtpTransport.sendMail(message, function(error) {
6061
if (error) {
6162
console.log('Error sending email');
@@ -241,4 +242,4 @@ mail.lookup = function(callback) {
241242
};
242243

243244
plugins.extendModule("mail", mail);
244-
module.exports = mail;
245+
module.exports = mail;

0 commit comments

Comments
 (0)