mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
Fixed some labelling issues and added support for last month
This commit is contained in:
@@ -218,16 +218,16 @@ SocketAdmin.analytics.get = function(socket, data, callback) {
|
||||
async.parallel({
|
||||
uniqueVisitors: function(next) {
|
||||
if (data.units === 'days') {
|
||||
getDailyStatsForSet('analytics:uniquevisitors', Date.now(), data.amount, next);
|
||||
getDailyStatsForSet('analytics:uniquevisitors', data.until || Date.now(), data.amount, next);
|
||||
} else {
|
||||
getHourlyStatsForSet('analytics:uniquevisitors', Date.now(), data.amount, next);
|
||||
getHourlyStatsForSet('analytics:uniquevisitors', data.until || Date.now(), data.amount, next);
|
||||
}
|
||||
},
|
||||
pageviews: function(next) {
|
||||
if (data.units === 'days') {
|
||||
getDailyStatsForSet('analytics:pageviews', Date.now(), data.amount, next);
|
||||
getDailyStatsForSet('analytics:pageviews', data.until || Date.now(), data.amount, next);
|
||||
} else {
|
||||
getHourlyStatsForSet('analytics:pageviews', Date.now(), data.amount, next);
|
||||
getHourlyStatsForSet('analytics:pageviews', data.until || Date.now(), data.amount, next);
|
||||
}
|
||||
},
|
||||
monthlyPageViews: function(next) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<hr/>
|
||||
<div class="text-center pull-left monthly-pageviews">
|
||||
<div><strong id="pageViewsLastMonth"></strong></div>
|
||||
<div>Page views Last Month</div>
|
||||
<div><a href="#" data-action="updateGraph" data-units="days" data-until="last-month">Page views Last Month</a></div>
|
||||
</div>
|
||||
<div class="text-center pull-left monthly-pageviews">
|
||||
<div><strong id="pageViewsThisMonth"></strong></div>
|
||||
|
||||
Reference in New Issue
Block a user