Skip to content

Commit b5edce1

Browse files
committed
Merge branch 'release.24.10' into release.24.12
# Conflicts: # CHANGELOG.md # frontend/express/public/stylesheets/vue/clyvue.scss
2 parents 24cc79b + 2385ceb commit b5edce1

File tree

10 files changed

+224
-156
lines changed

10 files changed

+224
-156
lines changed

CHANGELOG.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,21 @@ Dependencies:
4545
- Bump sass from 1.81.0 to 1.83.3
4646
- Bump tslib from 2.7.0 to 2.8.1
4747

48+
## Version 24.10.7
49+
Fixes:
50+
- [data-manager] Modifying existing values when segment values want to be updated in the Data Manager
51+
- [drill] Fix for UI error when push plugin is not enabled
52+
53+
Enterprise fixes:
54+
- [drill] Fixed empty events list in drill section
55+
56+
Features:
57+
- [core] Add self tracking capability
58+
- [hooks] Added remote config changes to internal actions
59+
- [system-utility] New endpoint: /take-heap-snapshot.
60+
- [system-utility] Using nodejs fs to write profiler files instead of gridfs.
61+
4862
## Version 24.10.6
49-
5063
Fixes:
5164
- [push] Using apns-id header as message result in debug mode
5265
- [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/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: [],

plugins/remote-config/api/api.js

+26
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,11 @@ plugins.setConfigs("remote-config", {
440440
}
441441
return common.returnMessage(params, 500, message);
442442
}
443+
444+
plugins.dispatch("/i/remote-config/add-parameter", {
445+
params: parameter
446+
});
447+
443448
if (params.internal) {
444449
return true;
445450
}
@@ -967,6 +972,10 @@ plugins.setConfigs("remote-config", {
967972
return common.returnMessage(params, 500, message);
968973
}
969974

975+
plugins.dispatch("/i/remote-config/update-parameter", {
976+
params: parameter
977+
});
978+
970979
return common.returnMessage(params, 200);
971980
});
972981
}
@@ -1089,6 +1098,9 @@ plugins.setConfigs("remote-config", {
10891098
common.outDb.collection(collectionName).remove({_id: common.outDb.ObjectID(parameterId)}, function(removeErr) {
10901099
if (!removeErr) {
10911100
plugins.dispatch("/systemlogs", {params: params, action: "rc_parameter_removed", data: parameter});
1101+
plugins.dispatch("/i/remote-config/remove-parameter", {
1102+
params: parameter
1103+
});
10921104
return common.returnMessage(params, 200, 'Success');
10931105
}
10941106

@@ -1175,6 +1187,9 @@ plugins.setConfigs("remote-config", {
11751187
}
11761188

11771189
var conditionId = result && result[1] || null;
1190+
plugins.dispatch("/i/remote-config/add-condition", {
1191+
params: condition
1192+
});
11781193
if (params.internal) {
11791194
return conditionId;
11801195
}
@@ -1353,6 +1368,10 @@ plugins.setConfigs("remote-config", {
13531368
return common.returnMessage(params, 500, message);
13541369
}
13551370

1371+
plugins.dispatch("/i/remote-config/update-condition", {
1372+
params: condition
1373+
});
1374+
13561375
return common.returnMessage(params, 200);
13571376
});
13581377

@@ -1396,6 +1415,13 @@ plugins.setConfigs("remote-config", {
13961415

13971416
async.parallel(asyncTasks, function(err) {
13981417
if (!err) {
1418+
plugins.dispatch("/i/remote-config/remove-condition", {
1419+
params: {
1420+
conditionId: conditionId,
1421+
appId: appId,
1422+
ts: Date.now()
1423+
}
1424+
});
13991425
return common.returnMessage(params, 200, 'Success');
14001426
}
14011427

0 commit comments

Comments
 (0)