Sort clients from higher to lower in tracker stats (#1073)

This commit is contained in:
Cønstantine Kovalensky 2023-11-09 20:38:03 +04:00 committed by GitHub
commit 6f89865f0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,7 @@ if ($client_full || !$stats_cache = CACHE('tr_cache')->get('tracker_clients_stat
$client_count++; $client_count++;
} }
arsort($clients, SORT_NUMERIC);
foreach ($clients as $client => $count) { foreach ($clients as $client => $count) {
$percentage = number_format(($count / $client_count) * 100, 2); $percentage = number_format(($count / $client_count) * 100, 2);
$clients_percentage[$client] = "[$count] => $percentage%"; $clients_percentage[$client] = "[$count] => $percentage%";