Skip to content

Commit 0f8f9f2

Browse files
Merge branch 'next' of http://github.com/Countly/countly-server into abhishek/themes
2 parents 4fe339d + ac39123 commit 0f8f9f2

File tree

36 files changed

+690
-345
lines changed

36 files changed

+690
-345
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## Version 22.03.12
2+
3+
Fixes:
4+
- [UI] Custom file name for export functionality in the datatable
5+
- [dashboards] Subheading and label prop in the select app component
6+
- [jobs] More rescheduling attempts
7+
- [push] Adding lastRuns
8+
- [push] Adding too late to send error
9+
- [push] Filtering messages by status
10+
- [push] Variables for API messages
11+
- [push] Waiting for connect promise to resolve
12+
- [systemlogs] Make sure we store correct MongoDB documents
13+
- [user-management] Apply filter when reset filter button is clicked
14+
- [user-management] Set filter dropdown width
15+
16+
Enterprise fixes:
17+
- [cohorts] Cohort name is not editable after creation
18+
- [cohorts] Cohorts aren't sortable in "Current Users" column
19+
- [concurrent_users] Don't show period in online users widget
20+
- [concurrent_users] Max online user values should be resettable from an app level configuration
21+
- [concurrent_users] x-Axis labels of this online users graph on dashboards horizontally
22+
- [config-transfer] Config transfer supports Fitlering rules
23+
- [drill] Make default visualization 'Bar Chart' if query contains BY in Drill
24+
- [drill] When exporting BY query table result in drill to excel file, key column is empty
25+
- [formulas] Expression value checks for copy formulas
26+
- [users] Decode event name in userprofile event timeline section
27+
128
## Version 22.03.11
229

330
Fixes:

api/configextender.js

+78-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,81 @@ const OVERRIDES = {
2626
REPLSETSERVERS: 'replSetServers',
2727
REPLICANAME: 'replicaName',
2828
MAX_POOL_SIZE: 'max_pool_size',
29-
DBOPTIONS: 'dbOptions',
30-
SERVEROPTIONS: 'serverOptions'
29+
DBOPTIONS: {
30+
__name: "dbOptions",
31+
AUTHMECHANISM: 'authMechanism',
32+
AUTHMECHANISMPROPERTIES: 'authMechanismProperties',
33+
AUTHSOURCE: 'authSource',
34+
AUTOENCRYPTION: 'autoEncryption',
35+
BSONREGEXP: 'bsonRegExp',
36+
CHECKKEYS: 'checkKeys',
37+
CHECKSERVERIDENTITY: 'checkServerIdentity',
38+
CONNECTTIMEOUTMS: 'connectTimeoutMS',
39+
DIRECTCONNECTION: 'directConnection',
40+
DRIVERINFO: 'driverInfo',
41+
ECDHCURVE: 'ecdhCurve',
42+
ENABLEUTF8VALIDATION: 'enableUtf8Validation',
43+
FIELDSASRAW: 'fieldsAsRaw',
44+
FORCESERVEROBJECTID: 'forceServerObjectId',
45+
HEARTBEATFREQUENCYMS: 'heartbeatFrequencyMS',
46+
IGNOREUNDEFINED: 'ignoreUndefined',
47+
KEEPALIVE: 'keepAlive',
48+
KEEPALIVEINITIALDELAY: 'keepAliveInitialDelay',
49+
LOADBALANCED: 'loadBalanced',
50+
LOCALADDRESS: 'localAddress',
51+
LOCALPORT: 'localPort',
52+
LOCALTHRESHOLDMS: 'localThresholdMS',
53+
LOGGERLEVEL: 'loggerLevel',
54+
MAXIDLETIMEMS: 'maxIdleTimeMS',
55+
MAXPOOLSIZE: 'maxPoolSize',
56+
MAXSTALENESSSECONDS: 'maxStalenessSeconds',
57+
MINDHSIZE: 'minDHSize',
58+
MINHEARTBEATFREQUENCYMS: 'minHeartbeatFrequencyMS',
59+
MINPOOLSIZE: 'minPoolSize',
60+
MONITORCOMMANDS: 'monitorCommands',
61+
NODELAY: 'noDelay',
62+
PKFACTORY: 'pkFactory',
63+
PROMISELIBRARY: 'promiseLibrary',
64+
PROMOTEBUFFERS: 'promoteBuffers',
65+
PROMOTELONGS: 'promoteLongs',
66+
PROMOTEVALUES: 'promoteValues',
67+
PROXYHOST: 'proxyHost',
68+
PROXYPASSWORD: 'proxyPassword',
69+
PROXYPORT: 'proxyPort',
70+
PROXYUSERNAME: 'proxyUsername',
71+
READCONCERN: 'readConcern',
72+
READCONCERNLEVEL: 'readConcernLevel',
73+
READPREFERENCE: 'readPreference',
74+
READPREFERENCETAGS: 'readPreferenceTags',
75+
REJECTUNAUTHORIZED: 'rejectUnauthorized',
76+
REPLICASET: 'replicaSet',
77+
RETRYREADS: 'retryReads',
78+
RETRYWRITES: 'retryWrites',
79+
SECURECONTEXT: 'secureContext',
80+
SECUREPROTOCOL: 'secureProtocol',
81+
SERIALIZEFUNCTIONS: 'serializeFunctions',
82+
SERVERAPI: 'serverApi',
83+
SERVERSELECTIONTIMEOUTMS: 'serverSelectionTimeoutMS',
84+
SOCKETTIMEOUTMS: 'socketTimeoutMS',
85+
SRVMAXHOSTS: 'srvMaxHosts',
86+
SRVSERVICENAME: 'srvServiceName',
87+
SSLCA: 'sslCA',
88+
SSLCRL: 'sslCRL',
89+
SSLCERT: 'sslCert',
90+
SSLKEY: 'sslKey',
91+
SSLPASS: 'sslPass',
92+
SSLVALIDATE: 'sslValidate',
93+
TLSALLOWINVALIDCERTIFICATES: 'tlsAllowInvalidCertificates',
94+
TLSALLOWINVALIDHOSTNAMES: 'tlsAllowInvalidHostnames',
95+
TLSCAFILE: 'tlsCAFile',
96+
TLSCERTIFICATEFILE: 'tlsCertificateFile',
97+
TLSCERTIFICATEKEYFILE: 'tlsCertificateKeyFile',
98+
TLSCERTIFICATEKEYFILEPASSWORD: 'tlsCertificateKeyFilePassword',
99+
TLSINSECURE: 'tlsInsecure',
100+
WAITQUEUETIMEOUTMS: 'waitQueueTimeoutMS',
101+
WTIMEOUTMS: 'wtimeoutMS',
102+
ZLIBCOMPRESSIONLEVEL: 'zlibCompressionLevel',
103+
},
31104
},
32105

33106
API: {
@@ -66,6 +139,9 @@ function dig(config, over, name, value) {
66139
sub = over[n];
67140
over[n] = {};
68141
}
142+
else if (over[n] && over[n].__name) {
143+
sub = over[n].__name;
144+
}
69145
else {
70146
sub = Object.keys(config).filter(k => k.toUpperCase() === n)[0];
71147
}

frontend/express/public/core/user-management/templates/data-table.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h4>{{i18n('management-users.view-title')}}</h4>
3232
</div>
3333
<div class="bu-level-right">
3434
<div class="bu-level-item">
35-
<el-button type="text" class="bu-has-text-danger" @click="handleResetFilterClick">{{i18n('management-users.reset-filters')}}</el-button>
35+
<el-button type="text" class="cly-multi-select__reset" @click="handleResetFilterClick">{{i18n('management-users.reset-filters')}}</el-button>
3636
</div>
3737
</div>
3838
</div>

frontend/express/public/javascripts/countly/countly.common.js

+73-28
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@
16251625
currOrPrevious = _.pluck(dataProperties, "period"),
16261626
activeDate,
16271627
activeDateArr;
1628+
var previousDateArr = [];
16281629

16291630
for (var j = 0; j < propertyNames.length; j++) {
16301631
if (currOrPrevious[j] === "previous") {
@@ -1637,6 +1638,24 @@
16371638
activeDate = countlyCommon.periodObj.previousPeriod;
16381639
}
16391640
}
1641+
else if (currOrPrevious[j] === "previousThisMonth") {
1642+
//get first date of current month
1643+
var date = new Date();
1644+
var lastDay = new Date(date.getFullYear(), date.getMonth(), 1);
1645+
1646+
// count of days of the current month
1647+
var currentMonthCount = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
1648+
1649+
// get date of currenthMonthCount days ago
1650+
var firstDay = new Date(lastDay.getTime());
1651+
firstDay.setDate(lastDay.getDate() - currentMonthCount);
1652+
1653+
// get an array between two date
1654+
for (var arr = [], dt = new Date(firstDay); dt <= new Date(lastDay); dt.setDate(dt.getDate() + 1)) {
1655+
arr.push(dt.getFullYear() + '.' + (dt.getMonth() + 1) + '.' + dt.getDate());
1656+
}
1657+
previousDateArr = arr;
1658+
}
16401659
else {
16411660
if (countlyCommon.periodObj.isSpecialPeriod) {
16421661
periodMin = 0;
@@ -1647,44 +1666,67 @@
16471666
activeDate = countlyCommon.periodObj.activePeriod;
16481667
}
16491668
}
1650-
for (var i = periodMin, counter = 0; i < periodMax; i++, counter++) {
1651-
1652-
if (!countlyCommon.periodObj.isSpecialPeriod) {
1669+
if (currOrPrevious[j] === "previousThisMonth") {
1670+
for (var p = 0, counter_ = 0; p < previousDateArr.length - 1; p++, counter_++) {
1671+
formattedDate = moment((previousDateArr[p]).replace(/\./g, "/"), "YYYY/MM/DD");
1672+
dataObj = countlyCommon.getDescendantProp(db, previousDateArr[p] + metric);
1673+
dataObj = clearFunction(dataObj);
16531674

1654-
if (countlyCommon.periodObj.periodMin === 0) {
1655-
formattedDate = moment((activeDate + " " + i + ":00:00").replace(/\./g, "/"), "YYYY/MM/DD HH:mm:ss");
1675+
if (!tableData[counter_]) {
1676+
tableData[counter_] = {};
16561677
}
1657-
else if (("" + activeDate).indexOf(".") === -1) {
1658-
formattedDate = moment((activeDate + "/" + i + "/1").replace(/\./g, "/"), "YYYY/MM/DD");
1678+
1679+
tableData[counter_].date = countlyCommon.formatDate(formattedDate, countlyCommon.periodObj.dateString);
1680+
var propertyValue_ = "";
1681+
if (propertyFunctions[j]) {
1682+
propertyValue_ = propertyFunctions[j](dataObj);
16591683
}
16601684
else {
1661-
formattedDate = moment((activeDate + "/" + i).replace(/\./g, "/"), "YYYY/MM/DD");
1685+
propertyValue_ = dataObj[propertyNames[j]];
16621686
}
16631687

1664-
dataObj = countlyCommon.getDescendantProp(db, activeDate + "." + i + metric);
1665-
}
1666-
else {
1667-
formattedDate = moment((activeDateArr[i]).replace(/\./g, "/"), "YYYY/MM/DD");
1668-
dataObj = countlyCommon.getDescendantProp(db, activeDateArr[i] + metric);
1688+
chartData[j].data[chartData[j].data.length] = [counter_, propertyValue_];
1689+
tableData[counter_][propertyNames[j]] = propertyValue_;
16691690
}
1691+
}
1692+
else {
1693+
for (var i = periodMin, counter = 0; i < periodMax; i++, counter++) {
1694+
if (!countlyCommon.periodObj.isSpecialPeriod) {
1695+
if (countlyCommon.periodObj.periodMin === 0) {
1696+
formattedDate = moment((activeDate + " " + i + ":00:00").replace(/\./g, "/"), "YYYY/MM/DD HH:mm:ss");
1697+
}
1698+
else if (("" + activeDate).indexOf(".") === -1) {
1699+
formattedDate = moment((activeDate + "/" + i + "/1").replace(/\./g, "/"), "YYYY/MM/DD");
1700+
}
1701+
else {
1702+
formattedDate = moment((activeDate + "/" + i).replace(/\./g, "/"), "YYYY/MM/DD");
1703+
}
16701704

1671-
dataObj = clearFunction(dataObj);
1705+
dataObj = countlyCommon.getDescendantProp(db, activeDate + "." + i + metric);
1706+
}
1707+
else {
1708+
formattedDate = moment((activeDateArr[i]).replace(/\./g, "/"), "YYYY/MM/DD");
1709+
dataObj = countlyCommon.getDescendantProp(db, activeDateArr[i] + metric);
1710+
}
16721711

1673-
if (!tableData[counter]) {
1674-
tableData[counter] = {};
1675-
}
1712+
dataObj = clearFunction(dataObj);
16761713

1677-
tableData[counter].date = countlyCommon.formatDate(formattedDate, countlyCommon.periodObj.dateString);
1678-
var propertyValue = "";
1679-
if (propertyFunctions[j]) {
1680-
propertyValue = propertyFunctions[j](dataObj);
1681-
}
1682-
else {
1683-
propertyValue = dataObj[propertyNames[j]];
1684-
}
1714+
if (!tableData[counter]) {
1715+
tableData[counter] = {};
1716+
}
16851717

1686-
chartData[j].data[chartData[j].data.length] = [counter, propertyValue];
1687-
tableData[counter][propertyNames[j]] = propertyValue;
1718+
tableData[counter].date = countlyCommon.formatDate(formattedDate, countlyCommon.periodObj.dateString);
1719+
var propertyValue = "";
1720+
if (propertyFunctions[j]) {
1721+
propertyValue = propertyFunctions[j](dataObj);
1722+
}
1723+
else {
1724+
propertyValue = dataObj[propertyNames[j]];
1725+
}
1726+
1727+
chartData[j].data[chartData[j].data.length] = [counter, propertyValue];
1728+
tableData[counter][propertyNames[j]] = propertyValue;
1729+
}
16881730
}
16891731
}
16901732

@@ -2692,7 +2734,10 @@
26922734
else {
26932735
if (_period === "day") {
26942736
start.add(1, 'days');
2695-
for (i = 0; i < new Date(start.year(), start.month(), 0).getDate(); i++) {
2737+
var now = new Date();
2738+
// it will add the count of days of the current month to the x-axis label
2739+
var currentMonthCount = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();
2740+
for (i = 0; i < currentMonthCount; i++) {
26962741
ticks.push([i, countlyCommon.formatDate(start, "D MMM")]);
26972742
tickTexts[i] = countlyCommon.formatDate(start, "D MMM, dddd");
26982743
start.add(1, 'days');

frontend/express/public/javascripts/countly/countly.session.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
func: function(dataObj) {
119119
return dataObj.t;
120120
},
121-
period: "previous"
121+
period: countlyCommon.getPeriod() === 'day' ? "previousThisMonth" : "previous"
122122
},
123123
{ name: "t" }
124124
];

0 commit comments

Comments
 (0)