mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-17 04:03:13 -04:00
22 lines
743 B
PHP
22 lines
743 B
PHP
<?php
|
|
|
|
$statsUser = new Gazelle\Stats\Users;
|
|
$flow = $statsUser->flow();
|
|
|
|
[$Countries, $Rank, $CountryUsers, $CountryMax, $CountryMin, $LogIncrements]
|
|
= $statsUser->geoDistribution();
|
|
|
|
echo $Twig->render('stats/user.twig', [
|
|
'distribution' => [
|
|
'browser' => $statsUser->browserDistribution(),
|
|
'class' => $statsUser->userclassDistribution(),
|
|
'platform' => $statsUser->platformDistribution(),
|
|
],
|
|
'flow' => [
|
|
'month' => array_keys($flow),
|
|
'add' => array_values(array_map(fn($m) => $m['new'], $flow)),
|
|
'del' => array_values(array_map(fn($m) => -$m['disabled'], $flow)),
|
|
'net' => array_values(array_map(fn($m) => $m['new'] - $m['disabled'], $flow)),
|
|
],
|
|
]);
|