v1.18.x
psychobunny 10 years ago
parent 799cc9397a
commit 5c59aa7737

@ -130,7 +130,7 @@
}
.monthly-pageviews {
width:50%;
width:33%;
}
.motd textarea {

@ -338,8 +338,10 @@ define('admin/general/dashboard', ['semver'], function(semver) {
$('#pageViewsThisMonth').html(data.monthlyPageViews.thisMonth);
$('#pageViewsLastMonth').html(data.monthlyPageViews.lastMonth);
$('#pageViewsPastDay').html(data.pastDay);
utils.addCommasToNumbers($('#pageViewsThisMonth'));
utils.addCommasToNumbers($('#pageViewsLastMonth'));
utils.addCommasToNumbers($('#pageViewsPastDay'));
});
}

@ -234,7 +234,10 @@ SocketAdmin.analytics.get = function(socket, data, callback) {
monthlyPageViews: function(next) {
getMonthlyPageViews(next);
}
}, callback);
}, function(err, data) {
data.pastDay = data.pageviews.reduce(function(a, b) {return parseInt(a, 10) + parseInt(b, 10);});
callback(err, data);
});
}
} else {
callback(new Error('Invalid analytics call'));

@ -19,6 +19,10 @@
<div><strong id="pageViewsThisMonth"></strong></div>
<div>Page views This Month</div>
</div>
<div class="text-center pull-left monthly-pageviews">
<div><strong id="pageViewsPastDay"></strong></div>
<div>Page views in last 24 hours</div>
</div>
</div>
</div>

Loading…
Cancel
Save