Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Enterprise Features:
- [oidc] PKCE Flow support added

Fixes:
- [core] Fix auto refresh frontend component
- [core] Unifying alphabetical order for dropdowns with dashboard apps
- [formulas] Fix loading state when selecting event count
- [hooks] Added null check for incoming data
- [core] Fix auto refresh frontend component
- [times-of-day] Fix chart component
- [push] Fix external drawer initialization
- [times-of-day] Fix chart component

Enterprise Fixes:
- [content] Asset URL was wrongly constructed when user switches between apps
Expand Down
12 changes: 11 additions & 1 deletion frontend/express/public/javascripts/countly/countly.event.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
_period = null;
var _activeLoadedEvent = "";
var _activeLoadedSegmentation = "";
var _refreshEventsPromise = null;

countlyEvent.hasLoadedData = function() {
if (_activeLoadedEvent && _activeLoadedEvent === _activeEvent && _activeLoadedSegmentation === _activeSegmentation) {
Expand Down Expand Up @@ -497,7 +498,11 @@

countlyEvent.refreshEvents = function() {
if (!countlyCommon.DEBUG) {
return $.ajax({
if (_refreshEventsPromise) {
return _refreshEventsPromise;
}

_refreshEventsPromise = $.ajax({
type: "GET",
url: countlyCommon.API_PARTS.data.r,
data: {
Expand All @@ -510,8 +515,13 @@
if (!_activeEvent && countlyEvent.getEvents()[0]) {
_activeEvent = countlyEvent.getEvents()[0].key;
}
},
complete: function() {
_refreshEventsPromise = null;
}
});

return _refreshEventsPromise;
}
else {
_activeEvents = {};
Expand Down
Loading