mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
Fixed issue where page view counts kept changing
... when they should only really be updated for the hourly pageviews graph.
This commit is contained in:
@@ -332,6 +332,13 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
graphs.traffic.scale.xLabels = getDaysArray(until);
|
graphs.traffic.scale.xLabels = getDaysArray(until);
|
||||||
} else {
|
} else {
|
||||||
graphs.traffic.scale.xLabels = getHoursArray();
|
graphs.traffic.scale.xLabels = getHoursArray();
|
||||||
|
|
||||||
|
$('#pageViewsThisMonth').html(data.monthlyPageViews.thisMonth);
|
||||||
|
$('#pageViewsLastMonth').html(data.monthlyPageViews.lastMonth);
|
||||||
|
$('#pageViewsPastDay').html(data.pastDay);
|
||||||
|
utils.addCommasToNumbers($('#pageViewsThisMonth'));
|
||||||
|
utils.addCommasToNumbers($('#pageViewsLastMonth'));
|
||||||
|
utils.addCommasToNumbers($('#pageViewsPastDay'));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0, ii = data.pageviews.length; i < ii; i++) {
|
for (var i = 0, ii = data.pageviews.length; i < ii; i++) {
|
||||||
@@ -349,13 +356,6 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
graphs.traffic.update();
|
graphs.traffic.update();
|
||||||
currentGraph.units = units;
|
currentGraph.units = units;
|
||||||
currentGraph.until = until;
|
currentGraph.until = until;
|
||||||
|
|
||||||
$('#pageViewsThisMonth').html(data.monthlyPageViews.thisMonth);
|
|
||||||
$('#pageViewsLastMonth').html(data.monthlyPageViews.lastMonth);
|
|
||||||
$('#pageViewsPastDay').html(data.pastDay);
|
|
||||||
utils.addCommasToNumbers($('#pageViewsThisMonth'));
|
|
||||||
utils.addCommasToNumbers($('#pageViewsLastMonth'));
|
|
||||||
utils.addCommasToNumbers($('#pageViewsPastDay'));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user