Expose more statistics

* differenciate local & all events/comments/groups
* add instance follows/followings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-10-07 10:05:07 +02:00
parent 09a0cbf3f1
commit 02eac30c9b
8 changed files with 118 additions and 10 deletions

View File

@@ -12,9 +12,14 @@ defmodule Mobilizon.GraphQL.Resolvers.Statistics do
{:ok,
%{
number_of_users: StatisticsModule.get_cached_value(:local_users),
number_of_events: StatisticsModule.get_cached_value(:local_events),
number_of_comments: StatisticsModule.get_cached_value(:local_comments),
number_of_groups: StatisticsModule.get_cached_value(:local_groups)
number_of_events: StatisticsModule.get_cached_value(:federation_events),
number_of_local_events: StatisticsModule.get_cached_value(:local_events),
number_of_comments: StatisticsModule.get_cached_value(:federation_comments),
number_of_local_comments: StatisticsModule.get_cached_value(:local_comments),
number_of_groups: StatisticsModule.get_cached_value(:federation_groups),
number_of_local_groups: StatisticsModule.get_cached_value(:local_groups),
number_of_instance_followings: StatisticsModule.get_cached_value(:instance_followings),
number_of_instance_followers: StatisticsModule.get_cached_value(:instance_followers)
}}
end
end