We still need to call the data endpoint (#14443)
This commit is contained in:
Родитель
3fac003b81
Коммит
c6bab71250
|
@ -128,7 +128,8 @@
|
|||
date_range_days = parseInt((end - start) / 1000 / 3600 / 24, 10),
|
||||
fields = obj.fields ? obj.fields.slice(0,5) : ['count'],
|
||||
series = {},
|
||||
events = obj.events,
|
||||
events = [], // TODO: remove this, it is not used anymore because
|
||||
// the caller does not pass any values anymore.
|
||||
chartRange = {},
|
||||
t, row, i, field, val,
|
||||
is_overview = metric == 'overview' || metric == 'app_overview';
|
||||
|
|
|
@ -101,10 +101,21 @@ z.StatsManager = (function() {
|
|||
if (currentView.range.custom && typeof currentView.range.end == 'object') {
|
||||
currentView.range.end = new Date(currentView.range.end.getTime() + msDay);
|
||||
}
|
||||
|
||||
// Fetch the data from the server or storage, and notify other components.
|
||||
$.when(getDataRange(currentView))
|
||||
.then(function(data) {
|
||||
setTimeout(function() {
|
||||
$(window).trigger("dataready", {
|
||||
'view' : currentView,
|
||||
'fields': getAvailableFields(currentView),
|
||||
'data' : data,
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
$(window).on('changeview', processView);
|
||||
|
||||
|
||||
function annotateData(data, events) {
|
||||
var i, ev, sd, ed;
|
||||
for (i=0; i < events.length; i++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче