|
|
|
@ -3,8 +3,9 @@ RocketChat.statistics.get = -> |
|
|
|
|
|
|
|
|
|
# Version |
|
|
|
|
statistics.uniqueId = RocketChat.settings.get("uniqueID") |
|
|
|
|
statistics.version = BuildInfo?.commit?.hash |
|
|
|
|
statistics.versionDate = BuildInfo?.commit?.date |
|
|
|
|
statistics.version = RocketChat.Info?.version |
|
|
|
|
statistics.tag = RocketChat.Info?.tag |
|
|
|
|
statistics.branch = RocketChat.Info?.branch |
|
|
|
|
|
|
|
|
|
# User statistics |
|
|
|
|
statistics.totalUsers = Meteor.users.find().count() |
|
|
|
@ -70,6 +71,14 @@ RocketChat.statistics.get = -> |
|
|
|
|
else |
|
|
|
|
console.log 'private group user statistic not found'.red |
|
|
|
|
|
|
|
|
|
statistics.lastLogin = RocketChat.models.Users.getLastLogin() |
|
|
|
|
statistics.lastMessageSentAt = RocketChat.models.Messages.getLastTimestamp() |
|
|
|
|
statistics.lastSeenSubscription = RocketChat.models.Subscriptions.getLastSeen() |
|
|
|
|
|
|
|
|
|
migration = Migrations?._getControl() |
|
|
|
|
if migration |
|
|
|
|
statistics.migration = _.pick(migration, 'version', 'locked') |
|
|
|
|
|
|
|
|
|
os = Npm.require('os') |
|
|
|
|
statistics.os = |
|
|
|
|
type: os.type() |
|
|
|
|