File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,11 @@ public function collect(): array
116116 'backup ' => [
117117 'type ' => config ('backups.default ' ),
118118 ],
119+
119120 'cache ' => [
120121 'type ' => config ('cache.default ' ),
121122 ],
123+
122124 'database ' => [
123125 'type ' => config ('database.default ' ),
124126 'version ' => DB ::getPdo ()->getAttribute (PDO ::ATTR_SERVER_VERSION ),
@@ -139,7 +141,10 @@ public function collect(): array
139141
140142 'eggs ' => [
141143 'count ' => Egg::count (),
142- 'ids ' => Egg::pluck ('uuid ' )->toArray (),
144+ 'server_usage ' => Egg::all ()
145+ ->flatMap (fn (Egg $ egg ) => [$ egg ->uuid => $ egg ->servers ->count ()])
146+ ->filter (fn (int $ count ) => $ count > 0 )
147+ ->toArray (),
143148 ],
144149
145150 'locations ' => [
@@ -152,6 +157,10 @@ public function collect(): array
152157
153158 'nests ' => [
154159 'count ' => Nest::count (),
160+ 'server_usage ' => Nest::all ()
161+ ->flatMap (fn (Nest $ nest ) => [$ nest ->uuid => $ nest ->eggs ->sum (fn (Egg $ egg ) => $ egg ->servers ->count ())])
162+ ->filter (fn (int $ count ) => $ count > 0 )
163+ ->toArray (),
155164 ],
156165
157166 'nodes ' => [
Original file line number Diff line number Diff line change 187187 */
188188
189189 'telemetry ' => [
190- 'enabled ' => env ('PTERODACTYL_TELEMETRY_ENABLED ' , false ),
190+ 'enabled ' => env ('PTERODACTYL_TELEMETRY_ENABLED ' , true ),
191191 ],
192192];
You can’t perform that action at this time.
0 commit comments