Skip to content

Commit 6b1b550

Browse files
committed
Merge branch 'release.24.12' into next
2 parents 3ddc3fd + b5edce1 commit 6b1b550

File tree

11 files changed

+273
-158
lines changed

11 files changed

+273
-158
lines changed

CHANGELOG.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,21 @@ Dependencies:
5353
- Bump sass from 1.81.0 to 1.83.3
5454
- Bump tslib from 2.7.0 to 2.8.1
5555

56+
## Version 24.10.7
57+
Fixes:
58+
- [data-manager] Modifying existing values when segment values want to be updated in the Data Manager
59+
- [drill] Fix for UI error when push plugin is not enabled
60+
61+
Enterprise fixes:
62+
- [drill] Fixed empty events list in drill section
63+
64+
Features:
65+
- [core] Add self tracking capability
66+
- [hooks] Added remote config changes to internal actions
67+
- [system-utility] New endpoint: /take-heap-snapshot.
68+
- [system-utility] Using nodejs fs to write profiler files instead of gridfs.
69+
5670
## Version 24.10.6
57-
5871
Fixes:
5972
- [push] Using apns-id header as message result in debug mode
6073
- [server-stats] Fix data point calculation in job

frontend/express/public/core/date-presets/javascripts/countly.views.js

100755100644
+8-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global Vue app, countlyVue, CV, countlyGlobal, groupsModel, _, CountlyHelpers, countlyPresets*/
1+
/*global Vue app, countlyVue, CV, countlyGlobal, groupsModel, _, CountlyHelpers, countlyPresets, countlyAuth*/
22

33
(function() {
44

@@ -459,11 +459,13 @@
459459
});
460460
};
461461

462-
app.route("/manage/date-presets", "date-presets", function() {
463-
const PresetManagementView = getManagementView();
464-
this.renderWhenReady(PresetManagementView);
465-
});
462+
if (countlyAuth.validateCreate('core')) {
463+
app.route("/manage/date-presets", "date-presets", function() {
464+
const PresetManagementView = getManagementView();
465+
this.renderWhenReady(PresetManagementView);
466+
});
466467

467-
app.addMenu("management", {code: "presets", permission: "core", url: "#/manage/date-presets", text: "sidebar.management.presets", priority: 30});
468+
app.addMenu("management", {code: "presets", permission: "core", url: "#/manage/date-presets", text: "sidebar.management.presets", priority: 30});
469+
}
468470

469471
})();

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

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ var AppRouter = Backbone.Router.extend({
11591159
}
11601160
});
11611161

1162-
if (countlyAuth.validateRead('core')) {
1162+
if (countlyAuth.validateCreate('core')) {
11631163
self.addSubMenu("management", {code: "longtasks", permission: "core", url: "#/manage/tasks", text: "sidebar.management.longtasks", priority: 10});
11641164
}
11651165

frontend/express/public/javascripts/countly/vue/components/helpers.js

+74-52
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global Vue, CV, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon CountlyHelpers*/
1+
/* global Vue, CV, $, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon CountlyHelpers*/
22

33
(function(countlyVue) {
44

@@ -580,32 +580,36 @@
580580

581581
Vue.component("cly-event-select", countlyBaseComponent.extend({
582582
mixins: [countlyVue.mixins.i18n],
583-
template: '<cly-select-x\
584-
:test-id="testId"\
585-
pop-class="cly-event-select"\
586-
all-placeholder="All Events"\
587-
search-placeholder="Search in Events"\
588-
placeholder="Select Event"\
589-
:disabled="disabled"\
590-
:hide-default-tabs="true"\
591-
:options="availableEvents"\
592-
:hide-all-options-tab="true"\
593-
:single-option-settings="singleOptionSettings"\
594-
:adaptive-length="adaptiveLength"\
595-
:arrow="arrow"\
596-
:width="width"\
597-
v-bind="$attrs"\
598-
v-on="$listeners">\
599-
<template v-slot:header="selectScope">\
600-
<h4 class="color-cool-gray-100 bu-mb-2" v-if="hasTitle">{{title}}</h4>\
601-
<el-radio-group\
602-
:value="selectScope.activeTabId"\
603-
@input="selectScope.updateTab"\
604-
size="small">\
605-
<el-radio-button :test-id="testId + \'-tab-\' + idx" v-for="(tab,idx) in selectScope.tabs" :key="tab.name" :label="tab.name">{{tab.label}}</el-radio-button>\
606-
</el-radio-group>\
607-
</template>\
608-
</cly-select-x>',
583+
template: '<div class="cly-event-select">\
584+
<cly-select-x\
585+
:test-id="testId"\
586+
pop-class="cly-event-select"\
587+
all-placeholder="All Events"\
588+
search-placeholder="Search in Events"\
589+
placeholder="Select Event"\
590+
:disabled="disabled"\
591+
:hide-default-tabs="true"\
592+
:options="availableEvents"\
593+
:hide-all-options-tab="true"\
594+
:single-option-settings="singleOptionSettings"\
595+
:adaptive-length="adaptiveLength"\
596+
:arrow="arrow"\
597+
:width="width"\
598+
v-bind="$attrs"\
599+
v-if="!isLoading"\
600+
v-on="$listeners">\
601+
<template v-slot:header="selectScope">\
602+
<h4 class="color-cool-gray-100 bu-mb-2" v-if="hasTitle">{{title}}</h4>\
603+
<el-radio-group\
604+
:value="selectScope.activeTabId"\
605+
@input="selectScope.updateTab"\
606+
size="small">\
607+
<el-radio-button :test-id="testId + \'-tab-\' + idx" v-for="(tab,idx) in selectScope.tabs" :key="tab.name" :label="tab.name">{{tab.label}}</el-radio-button>\
608+
</el-radio-group>\
609+
</template>\
610+
</cly-select-x>\
611+
<div v-else class="cly-event-select__loading el-loading-spinner"><i class="el-icon-loading bu-mr-2"></i><p class="el-loading-text">Loading...</p></div>\
612+
</div>',
609613
props: {
610614
blacklistedEvents: {
611615
type: Array,
@@ -626,16 +630,20 @@
626630
singleOptionSettings: {
627631
autoPick: true,
628632
hideList: true
629-
}
633+
},
634+
availableEvents: [],
635+
isLoading: false
630636
};
631637
},
632638
computed: {
633639
hasTitle: function() {
634640
return !!this.title;
635-
},
636-
availableEvents: function() {
641+
}
642+
},
643+
methods: {
644+
prepareAvailableEvents: function() {
637645
var self = this;
638-
var availableEvents = [
646+
var preparedEventList = [
639647
{
640648
"label": this.i18n('sidebar.analytics.sessions'),
641649
"name": "[CLY]_session",
@@ -648,7 +656,7 @@
648656
}
649657
];
650658
if (countlyGlobal.plugins.indexOf('views') !== -1) {
651-
availableEvents.push({
659+
preparedEventList.push({
652660
"label": this.i18n('internal-events.[CLY]_view'),
653661
"name": "[CLY]_view",
654662
"options": [ { label: this.i18n('internal-events.[CLY]_view'), value: '[CLY]_view' } ]
@@ -665,7 +673,7 @@
665673
feedbackOptions.push({ label: this.i18n('internal-events.[CLY]_survey'), value: '[CLY]_survey' });
666674
}
667675
if (feedbackOptions.length > 0) {
668-
availableEvents.push({
676+
preparedEventList.push({
669677
"label": this.i18n("sidebar.feedback"),
670678
"name": "feedback",
671679
"options": feedbackOptions
@@ -674,15 +682,15 @@
674682

675683

676684
if (countlyGlobal.plugins.indexOf('compliance-hub') !== -1) {
677-
availableEvents.push({
685+
preparedEventList.push({
678686
"label": this.i18n('internal-events.[CLY]_consent'),
679687
"name": "[CLY]_consent",
680688
"options": [ { label: this.i18n('internal-events.[CLY]_consent'), value: '[CLY]_consent' } ]
681689
});
682690
}
683691

684692
if (countlyGlobal.plugins.indexOf('crashes') !== -1) {
685-
availableEvents.push({
693+
preparedEventList.push({
686694
"label": this.i18n('internal-events.[CLY]_crash'),
687695
"name": "[CLY]_crash",
688696
"options": [ { label: this.i18n('internal-events.[CLY]_crash'), value: '[CLY]_crash' } ]
@@ -697,7 +705,7 @@
697705
{ label: this.i18n('internal-events.[CLY]_push_sent'), value: '[CLY]_push_sent' }
698706
]
699707
});*/
700-
availableEvents.push({
708+
preparedEventList.push({
701709
"label": 'Push Actioned',
702710
"name": "[CLY]_push_action",
703711
"options": [
@@ -712,26 +720,40 @@
712720
// "noChild": true
713721
// }
714722

715-
if (this.selectedApp) {
716-
countlyEvent.getEventsForApps([this.selectedApp], function(eData) {
717-
availableEvents[1].options = eData.map(function(e) {
718-
return {label: countlyCommon.unescapeHtml(e.name), value: e.value};
723+
return new Promise(function(resolve) {
724+
if (this.selectedApp) {
725+
self.isLoading = true;
726+
countlyEvent.getEventsForApps([this.selectedApp], function(eData) {
727+
preparedEventList[1].options = eData.map(function(e) {
728+
return {label: countlyCommon.unescapeHtml(e.name), value: e.value};
729+
});
719730
});
720-
});
721-
}
722-
else {
723-
availableEvents[1].options = countlyEvent.getEvents().map(function(event) {
724-
return {label: countlyCommon.unescapeHtml(event.name), value: event.key};
725-
});
726-
}
727-
728-
availableEvents = availableEvents.filter(function(evt) {
729-
return !(self.blacklistedEvents.includes(evt.name));
731+
preparedEventList = preparedEventList.filter(function(evt) {
732+
return !(self.blacklistedEvents.includes(evt.name));
733+
});
734+
self.isLoading = false;
735+
resolve(preparedEventList);
736+
}
737+
else {
738+
self.isLoading = true;
739+
$.when(countlyEvent.refreshEvents()).then(function() {
740+
const events = countlyEvent.getEvents();
741+
preparedEventList[1].options = events.map(function(event) {
742+
return {label: countlyCommon.unescapeHtml(event.name), value: event.key};
743+
});
744+
preparedEventList = preparedEventList.filter(function(evt) {
745+
return !(self.blacklistedEvents.includes(evt.name));
746+
});
747+
self.isLoading = false;
748+
resolve(preparedEventList);
749+
});
750+
}
730751
});
731-
732-
return availableEvents;
733752
}
734753
},
754+
created: async function() {
755+
this.availableEvents = await this.prepareAvailableEvents();
756+
}
735757
}));
736758

737759
Vue.component("cly-paginate", countlyBaseComponent.extend({

frontend/express/public/javascripts/countly/vue/components/sidebar.js

+49-2
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,56 @@
898898
return menu;
899899
});
900900
},
901-
handleButtonClick: function() {
901+
getFlexBannerUrl: function() {
902+
let defaultFlexUrl = 'https://flex.countly.com?utm_source=countly_lite_banner'; //fallback
903+
904+
return new Promise((resolve) => {
905+
try {
906+
if (!window.Countly) {
907+
CountlyHelpers.notify({
908+
title: "Error",
909+
message: "Countly SDK is not available",
910+
type: "error"
911+
});
912+
return resolve(defaultFlexUrl);
913+
}
914+
915+
let CountlySDK;
916+
if (window.Countly.present_feedback_widget) {
917+
CountlySDK = window.Countly;
918+
}
919+
else {
920+
CountlySDK = window.Countly.init({
921+
app_key: countlyGlobal.frontend_app,
922+
url: countlyGlobal.frontend_server,
923+
device_id: window.Countly.device_id || window.location.hostname,
924+
remote_config: true
925+
});
926+
}
927+
928+
if (CountlySDK.fetch_remote_config) {
929+
CountlySDK.fetch_remote_config(function(err, conf) {
930+
if (err) {
931+
resolve(defaultFlexUrl);
932+
}
933+
else {
934+
resolve(conf.flex_banner_url || defaultFlexUrl);
935+
}
936+
});
937+
}
938+
else {
939+
resolve(defaultFlexUrl);
940+
}
941+
}
942+
catch {
943+
resolve(defaultFlexUrl);
944+
}
945+
});
946+
},
947+
handleButtonClick: async function() {
948+
const flexRedirectUrl = await this.getFlexBannerUrl();
902949
CountlyHelpers.goTo({
903-
url: "https://flex.countly.com",
950+
url: flexRedirectUrl,
904951
isExternalLink: true
905952
});
906953
}

frontend/express/public/stylesheets/vue/clyvue.scss

+9-1
Original file line numberDiff line numberDiff line change
@@ -4320,7 +4320,6 @@
43204320
}
43214321
}
43224322

4323-
43244323
.cly-vue-content-builder {
43254324
position: absolute;
43264325
z-index: 2001;
@@ -4898,3 +4897,12 @@
48984897
border-radius: 8px;
48994898
}
49004899
}
4900+
4901+
.cly-event-select {
4902+
&__loading {
4903+
display: flex;
4904+
margin-top:0;
4905+
position: unset;
4906+
top:0;
4907+
}
4908+
}

plugins/hooks/api/parts/triggers/internal_event.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,19 @@ class InternalEventTrigger {
212212
}
213213
break;
214214
}
215+
case "/i/remote-config/add-parameter":
216+
case "/i/remote-config/update-parameter":
217+
case "/i/remote-config/remove-parameter":
218+
case "/i/remote-config/add-condition":
219+
case "/i/remote-config/update-condition":
220+
case "/i/remote-config/remove-condition":
221+
utils.updateRuleTriggerTime(rule._id);
222+
this.pipeline({
223+
params: ob,
224+
rule: rule,
225+
eventType,
226+
});
227+
break;
215228
case "/alerts/trigger": {
216229
this.pipeline({
217230
params: ob,
@@ -255,4 +268,10 @@ const InternalEvents = [
255268
"/i/app_users/delete",
256269
"/hooks/trigger",
257270
"/alerts/trigger",
258-
];
271+
"/i/remote-config/add-parameter",
272+
"/i/remote-config/update-parameter",
273+
"/i/remote-config/remove-parameter",
274+
"/i/remote-config/add-condition",
275+
"/i/remote-config/update-condition",
276+
"/i/remote-config/remove-condition",
277+
];

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

+6
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@
402402
{value: "/systemlogs", label: "/systemlogs"},
403403
{value: "/crashes/new", label: "/crashes/new"},
404404
{value: "/hooks/trigger", label: "/hooks/trigger"},
405+
{value: "/i/remote-config/add-parameter", label: "/i/remote-config/add-parameter"},
406+
{value: "/i/remote-config/update-parameter", label: "/i/remote-config/update-parameter"},
407+
{value: "/i/remote-config/remove-parameter", label: "/i/remote-config/remove-parameter"},
408+
{value: "/i/remote-config/add-condition", label: "/i/remote-config/add-condition"},
409+
{value: "/i/remote-config/update-condition", label: "/i/remote-config/update-condition"},
410+
{value: "/i/remote-config/remove-condition", label: "/i/remote-config/remove-condition"},
405411
{value: "/alerts/trigger", label: "/alerts/trigger"}
406412
],
407413
cohortOptions: [],

0 commit comments

Comments
 (0)