display user post topic stats in admin index

This commit is contained in:
barisusakli
2014-07-01 16:30:06 -04:00
parent 684f858415
commit e6c9647acf
3 changed files with 61 additions and 41 deletions

View File

@@ -39,29 +39,6 @@ SocketAdmin.restart = function(socket, data, callback) {
meta.restart();
};
SocketAdmin.getVisitorCount = function(socket, data, callback) {
var terms = {
day: 86400000,
week: 604800000,
month: 2592000000
};
var now = Date.now();
async.parallel({
day: function(next) {
db.sortedSetCount('ip:recent', now - terms.day, now, next);
},
week: function(next) {
db.sortedSetCount('ip:recent', now - terms.week, now, next);
},
month: function(next) {
db.sortedSetCount('ip:recent', now - terms.month, now, next);
},
alltime: function(next) {
db.sortedSetCount('ip:recent', 0, now, next);
}
}, callback);
};
SocketAdmin.fireEvent = function(socket, data, callback) {
index.server.sockets.emit(data.name, data.payload || {});
};