mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add total moderators/admins in stats
This commit is contained in:
parent
bb7cb0d2fd
commit
0165786f65
8 changed files with 88 additions and 29 deletions
|
@ -49,7 +49,14 @@ class StatsManager {
|
|||
async getStats () {
|
||||
const { totalLocalVideos, totalLocalVideoViews, totalVideos } = await VideoModel.getStats()
|
||||
const { totalLocalVideoComments, totalVideoComments } = await VideoCommentModel.getStats()
|
||||
const { totalUsers, totalDailyActiveUsers, totalWeeklyActiveUsers, totalMonthlyActiveUsers } = await UserModel.getStats()
|
||||
const {
|
||||
totalUsers,
|
||||
totalDailyActiveUsers,
|
||||
totalWeeklyActiveUsers,
|
||||
totalMonthlyActiveUsers,
|
||||
totalAdmins,
|
||||
totalModerators
|
||||
} = await UserModel.getStats()
|
||||
const { totalInstanceFollowers, totalInstanceFollowing } = await ActorFollowModel.getStats()
|
||||
const { totalLocalVideoFilesSize } = await VideoFileModel.getStats()
|
||||
const {
|
||||
|
@ -68,6 +75,14 @@ class StatsManager {
|
|||
totalWeeklyActiveUsers,
|
||||
totalMonthlyActiveUsers,
|
||||
|
||||
totalModerators: CONFIG.STATS.TOTAL_MODERATORS.ENABLED
|
||||
? totalModerators
|
||||
: null,
|
||||
|
||||
totalAdmins: CONFIG.STATS.TOTAL_ADMINS.ENABLED
|
||||
? totalAdmins
|
||||
: null,
|
||||
|
||||
totalLocalVideos,
|
||||
totalLocalVideoViews,
|
||||
totalLocalVideoComments,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue