mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
closes #2202
This commit is contained in:
@@ -17,7 +17,9 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
|
||||
clearInterval(updateIntervalId);
|
||||
}
|
||||
updateIntervalId = setInterval(function() {
|
||||
socket.emit('meta.rooms.getAll', Admin.updateRoomUsage);
|
||||
if (app.isFocused) {
|
||||
socket.emit('meta.rooms.getAll', Admin.updateRoomUsage);
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
$('#logout-link').on('click', function() {
|
||||
@@ -303,6 +305,10 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
|
||||
}
|
||||
|
||||
function updateTrafficGraph() {
|
||||
if (!app.isFocused) {
|
||||
return;
|
||||
}
|
||||
|
||||
socket.emit('admin.analytics.get', {graph: "traffic"}, function (err, data) {
|
||||
for (var i = 0, ii = data.pageviews.length; i < ii; i++) {
|
||||
graphs.traffic.datasets[0].points[i].value = data.pageviews[i];
|
||||
|
||||
Reference in New Issue
Block a user