Skip to content

Commit 2f79f15

Browse files
committed
[compare] add alert for error message
1 parent a02945f commit 2f79f15

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugins/compare/api/api.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ var exported = {},
188188
});
189189
});
190190
},
191-
function(err, res) {
192-
if (err) {
191+
function(err2, res) {
192+
if (err2) {
193193
return common.returnMessage(params, 503, 'Fetch apps data failed');
194194
}
195195
common.returnOutput(params, res);

plugins/compare/frontend/public/javascripts/countly.models.js

+3
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@
269269
}
270270

271271
_appData.all.avgduration.total = (_appData.all.sessions.total === 0) ? 0 : _appData.all.duration.total / _appData.all.sessions.total;
272+
},
273+
error: function() {
274+
window.CountlyHelpers.notify({type: 'error', message: jQuery.i18n.map['management-applications.plugins.error.server']});
272275
}
273276
});
274277
};

0 commit comments

Comments
 (0)