mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 00:52:43 +01:00
app(telemetry): disable server_usage for eggs and nests
This commit is contained in:
parent
680bce6d94
commit
8978da335e
@ -141,10 +141,12 @@ class TelemetryCollectionService
|
||||
|
||||
'eggs' => [
|
||||
'count' => Egg::count(),
|
||||
'server_usage' => Egg::all()
|
||||
->flatMap(fn (Egg $egg) => [$egg->uuid => $egg->servers->count()])
|
||||
->filter(fn (int $count) => $count > 0)
|
||||
->toArray(),
|
||||
// Egg UUIDs are generated randomly on import, so there is not a consistent way to
|
||||
// determine if servers are using default eggs or not.
|
||||
// 'server_usage' => Egg::all()
|
||||
// ->flatMap(fn (Egg $egg) => [$egg->uuid => $egg->servers->count()])
|
||||
// ->filter(fn (int $count) => $count > 0)
|
||||
// ->toArray(),
|
||||
],
|
||||
|
||||
'locations' => [
|
||||
@ -157,10 +159,12 @@ class TelemetryCollectionService
|
||||
|
||||
'nests' => [
|
||||
'count' => Nest::count(),
|
||||
'server_usage' => Nest::all()
|
||||
->flatMap(fn (Nest $nest) => [$nest->uuid => $nest->eggs->sum(fn (Egg $egg) => $egg->servers->count())])
|
||||
->filter(fn (int $count) => $count > 0)
|
||||
->toArray(),
|
||||
// Nest UUIDs are generated randomly on import, so there is not a consistent way to
|
||||
// determine if servers are using default eggs or not.
|
||||
// 'server_usage' => Nest::all()
|
||||
// ->flatMap(fn (Nest $nest) => [$nest->uuid => $nest->eggs->sum(fn (Egg $egg) => $egg->servers->count())])
|
||||
// ->filter(fn (int $count) => $count > 0)
|
||||
// ->toArray(),
|
||||
],
|
||||
|
||||
'nodes' => [
|
||||
|
Loading…
Reference in New Issue
Block a user