Skip to content

Commit b944239

Browse files
committed
Merge branch 'master' into next
# Conflicts: # CHANGELOG.md
2 parents 260b8c9 + 9ece661 commit b944239

11 files changed

Lines changed: 317 additions & 167 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
Dependencies:
33
- Remove SQLite
44

5+
## Version 25.03.28
6+
Fixes:
7+
- [alerts] Add alert interval validation in the frontend
8+
- [events] Correctly navigate to event groupmin events menu
9+
10+
Enterprise Fixes:
11+
- [applications] Ensure application management list reorders after create/update
12+
- [concurrent_users] Fix email check for alert
13+
- [dashboards] Keep dashboard sidebar sorted alphabetically after additions
14+
- [data-manager] Correctly show last triggered for events if data masking is enabled
15+
516
## Version 25.03.27
617
Fixes:
718
- [core-vis] Fix chart legend click event
819
- [push] Fixed the options of the request being made during mime detection
920
- [views] Fix view name that is displayed in view table
21+
- [data-manager] Fix last modified data for event and segment
1022

1123
Enterprise Fixes:
1224
- [concurrent_users] Fix alert threshold comparison

api/parts/data/fetch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ fetch.fetchEventGroups = function(params) {
137137
fetch.fetchMergedEventGroups = function(params) {
138138
const { qstring: { event } } = params;
139139
fetch.getMergedEventGroups(params, event, {}, function(result) {
140+
result = result || {};
141+
result.eventName = params.qstring.event;
140142
common.returnOutput(params, result);
141143
});
142144
};

bin/scripts/export-data/setting_limits_and_real_values.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const DEFAULT_LIMITS = {
1919
view_name_limit: 128,
2020
view_segment_limit: 100,
2121
view_segment_value_limit: 10,
22-
//custom_prop_limit: 20,
23-
custom_property_limit: 20,
22+
custom_prop_limit: 20,
23+
//custom_property_limit: 20,
2424
custom_prop_value_limit: 50,
2525
};
2626
Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("countly_drill")]).then(async function([countlyDb, drillDb]) {
@@ -56,8 +56,8 @@ Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("
5656
view_name_limit: pluginsCollectionPlugins?.views?.view_name_limit || DEFAULT_LIMITS.view_name_limit,
5757
view_segment_limit: pluginsCollectionPlugins?.views?.segment_limit || DEFAULT_LIMITS.view_segment_limit,
5858
view_segment_value_limit: pluginsCollectionPlugins?.views?.segment_value_limit || DEFAULT_LIMITS.view_segment_value_limit,
59-
//custom_prop_limit: pluginsCollectionPlugins?.users?.custom_prop_limit || DEFAULT_LIMITS.custom_prop_limit,
60-
custom_property_limit: pluginsCollectionPlugins?.drill?.custom_property_limit || DEFAULT_LIMITS.custom_property_limit,
59+
custom_prop_limit: pluginsCollectionPlugins?.users?.custom_prop_limit || DEFAULT_LIMITS.custom_prop_limit,
60+
//custom_property_limit: pluginsCollectionPlugins?.drill?.custom_property_limit || DEFAULT_LIMITS.custom_property_limit,
6161
custom_prop_value_limit: pluginsCollectionPlugins?.users?.custom_set_limit || DEFAULT_LIMITS.custom_prop_value_limit,
6262
};
6363
// GETTING REAL DATA PER APP
@@ -247,10 +247,10 @@ Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("
247247
});
248248
app_results['View Segments Unique Values'] = {"default": defaultVal, "set": currentVal, "real": realVal};
249249
// USER PROPERTIES
250-
//defaultVal = DEFAULT_LIMITS.custom_prop_limit;
251-
//currentVal = CURRENT_LIMITS.custom_prop_limit;
252-
defaultVal = DEFAULT_LIMITS.custom_property_limit;
253-
currentVal = CURRENT_LIMITS.custom_property_limit;
250+
defaultVal = DEFAULT_LIMITS.custom_prop_limit;
251+
currentVal = CURRENT_LIMITS.custom_prop_limit;
252+
//defaultVal = DEFAULT_LIMITS.custom_property_limit;
253+
//currentVal = CURRENT_LIMITS.custom_property_limit;
254254
realVal = customPropsPerApp && customPropsPerApp[0]?.customPropertiesCount || 0;
255255
app_results['Max user custom properties'] = {"default": defaultVal, "set": currentVal, "real": realVal};
256256
// VALUES IN AN ARRAY FOR ONE USER PROPERTY

frontend/express/public/core/app-management/javascripts/countly.views.js

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@
5959
value: id
6060
};
6161
});
62-
if (countlyGlobal.member.appSortList) {
63-
appList = this.sortBy(appList, countlyGlobal.member.appSortList);
62+
var sortList = (countlyGlobal.member && countlyGlobal.member.appSortList) || [];
63+
if (sortList.length) {
64+
appList = this.sortBy(appList, sortList);
6465
}
6566
else {
66-
appList.sort(function(a, b) {
67-
return a.label > b.label && 1 || -1;
68-
});
67+
appList.sort(this.sortAppOptionsAlphabetically);
6968
}
7069
var app_id = this.$route.params.app_id || countlyCommon.ACTIVE_APP_ID;
7170
return {
@@ -340,6 +339,56 @@
340339
}
341340
}
342341
},
342+
getAppListItemId: function(option) {
343+
if (!option) {
344+
return "";
345+
}
346+
347+
return (option._id || option.value || option.id || option.app_id || "") + "";
348+
},
349+
sortAppOptionsAlphabetically: function(optionA, optionB) {
350+
var labelA = (optionA.label || "").toLowerCase();
351+
var labelB = (optionB.label || "").toLowerCase();
352+
353+
if (labelA < labelB) {
354+
return -1;
355+
}
356+
357+
if (labelA > labelB) {
358+
return 1;
359+
}
360+
361+
var valueA = (optionA.value || "").toLowerCase();
362+
var valueB = (optionB.value || "").toLowerCase();
363+
364+
if (valueA < valueB) {
365+
return -1;
366+
}
367+
368+
if (valueA > valueB) {
369+
return 1;
370+
}
371+
372+
return 0;
373+
},
374+
applyAppListOrdering: function() {
375+
if (!Array.isArray(this.appList)) {
376+
return;
377+
}
378+
379+
var sortList = (countlyGlobal.member && countlyGlobal.member.appSortList) || [];
380+
var currentList = this.appList.slice();
381+
var orderedList;
382+
383+
if (sortList.length) {
384+
orderedList = this.sortBy(currentList, sortList);
385+
}
386+
else {
387+
orderedList = currentList.sort(this.sortAppOptionsAlphabetically);
388+
}
389+
390+
this.appList = orderedList;
391+
},
343392
sortBy: function(arrayToSort, sortList) {
344393
if (!sortList.length) {
345394
return arrayToSort;
@@ -349,9 +398,10 @@
349398
retArr = [];
350399
var i;
351400
for (i = 0; i < arrayToSort.length; i++) {
352-
var objId = arrayToSort[i]._id + "";
353-
if (sortList.indexOf(objId) !== -1) {
354-
tmpArr[sortList.indexOf(objId)] = arrayToSort[i];
401+
var objId = this.getAppListItemId(arrayToSort[i]);
402+
var desiredIndex = sortList.indexOf(objId);
403+
if (desiredIndex !== -1) {
404+
tmpArr[desiredIndex] = arrayToSort[i];
355405
}
356406
}
357407

@@ -392,6 +442,7 @@
392442
value: data._id + "",
393443
label: data.name
394444
});
445+
self.applyAppListOrdering();
395446
self.$store.dispatch("countlyCommon/addToAllApps", data);
396447
self.$store.dispatch("countlyCommon/updateActiveApp", data._id + "");
397448
countlyCommon.setActiveApp(data._id);
@@ -459,6 +510,7 @@
459510
break;
460511
}
461512
}
513+
self.applyAppListOrdering();
462514
self.discardForm();
463515
CountlyHelpers.notify({
464516
title: jQuery.i18n.map["configs.changed"],

frontend/express/public/core/events/javascripts/countly.details.models.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,13 @@
902902
res.list = res.list.map(eventName => countlyCommon.unescapeHtml(eventName));
903903
}
904904
context.commit("setAllEventsData", res);
905-
if ((!context.state.selectedEventName) || (res.map && res.map[context.state.selectedEventName] && !res.map[context.state.selectedEventName].is_visible) || (res.list && res.list.indexOf(context.state.selectedEventName) === -1)) {
905+
var is_group = false;
906+
if (context.state.selectedEventName && context.state.selectedEventName.startsWith('[CLY]_group')) {
907+
is_group = true;
908+
}
909+
if ((!context.state.selectedEventName) ||
910+
(res.map && res.map[context.state.selectedEventName] && !res.map[context.state.selectedEventName].is_visible) ||
911+
(res.list && res.list.indexOf(context.state.selectedEventName) === -1 && context.state && !is_group)) {
906912
var appId = countlyCommon.ACTIVE_APP_ID;
907913
var eventKeyForStorage = {};
908914
var eventKey = res.list[0];

plugins/alerts/frontend/public/javascripts/countly.views.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@
77
countlyCommon,
88
app,
99
countlyAuth,
10+
countlyPlugins,
1011
CV,
1112
groupsModel,
1213
_,
14+
VeeValidate,
1315
*/
1416
(function() {
1517
var ALERTS_FEATURE_NAME = "alerts";
1618

19+
VeeValidate.extend('alert_interval', function(inpValue, args) {
20+
var min = parseInt(args[0] || 0, 10);
21+
var max = parseInt(args[1] || 60, 10);
22+
var valid = parseInt(inpValue, 10) >= min && inpValue <= max;
23+
24+
if (valid) {
25+
return {
26+
valid: valid,
27+
};
28+
}
29+
30+
return 'Alert interval has to be between ' + min + ' and ' + max;
31+
});
32+
1733
var AlertDrawer = countlyVue.views.BaseView.extend({
1834
template: "#alert-drawer",
1935
mixins: [
@@ -418,7 +434,20 @@
418434
);
419435
}
420436
return this.emailOptions;
421-
}
437+
},
438+
alertIntervalValidationRules: function() {
439+
var rule = 'required';
440+
441+
if (this.$refs.drawerData.editedObject.alertDataType === 'onlineUsers') {
442+
var concurrentUserConfig = countlyPlugins.getConfigsData().concurrent_users || {};
443+
var concurrentAlertIntervalMin = concurrentUserConfig.alert_interval || 3;
444+
var concurrentAlertIntervalMax = Math.min(concurrentAlertIntervalMin + 60, 90);
445+
446+
rule += '|alert_interval:' + concurrentAlertIntervalMin + ',' + concurrentAlertIntervalMax;
447+
}
448+
449+
return rule;
450+
},
422451
},
423452
props: {
424453
placeholder: { type: String, default: "Select" },

plugins/alerts/frontend/public/stylesheets/vue-main.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@
143143
.alert-drawer-trigger-input {
144144
width: 48px;
145145
}
146+
147+
.is-error {
148+
.alert-drawer-trigger-input {
149+
background-color: #FBECE5 !important;
150+
}
151+
}
146152

147153
.no-spinner::-webkit-inner-spin-button,
148154
.no-spinner::-webkit-outer-spin-button {
@@ -335,4 +341,4 @@
335341
border-radius: 4px;
336342
background-position: center;
337343
display: inline-block;
338-
}
344+
}

0 commit comments

Comments
 (0)