File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ class Statistics::Users < Statistics::Statistics
44 def pctrecent ( value )
55 "%.0f%%" % ( 100.0 * value / nb_recently_seen_accounts )
66 end
7-
7+
8+ def pctrecent_filled ( value , field )
9+ # take into account those having declared an xmpp or mastodon account
10+ "%.0f%%" % ( 100.0 * value / filled ( field ) )
11+ end
12+
813 def nb_users
914 count "SELECT COUNT(*) AS cnt FROM users"
1015 end
Original file line number Diff line number Diff line change 249249 %th Domaines à plus de trois comptes
250250 %th Nombre de comptes
251251 %th Actifs
252+ %th % déclarés
252253 - @stats.top_xmpp_domains.each do |domain|
253254 %tr
254255 %td .stat
257258 .stat.misc (style ="width: #{(width_stats * domain[" cnt" ] / maxval).to_i}px;" )= domain[" cnt" ]
258259 %td
259260 #{@stats.pctrecent(domain["cnt"])}
261+ %td
262+ #{@stats.pctrecent_filled(domain["cnt"],"jabber_id")}
260263
261264 %h2 #stats_mastodon Domaines Mastodon
262265 %p
267270 %th Domaines à plus de trois comptes
268271 %th Nombre de comptes
269272 %th Actifs
273+ %th % déclarés
270274 - @stats.top_mastodon_domains.each do |domain|
271275 %tr
272276 %td .stat
275279 .stat.misc (style ="width: #{(width_stats * domain[" cnt" ] / maxval).to_i}px;" )= domain[" cnt" ]
276280 %td
277281 #{@stats.pctrecent(domain["cnt"])}
282+ %td
283+ #{@stats.pctrecent_filled(domain["cnt"],"mastodon_url")}
284+
278285
279286 %h2 #stats_fonctionnalites Utilisation des fonctionnalités
280287 %p
You can’t perform that action at this time.
0 commit comments