From 4770af453b8515558a03163ddc744e798fc2b206 Mon Sep 17 00:00:00 2001 From: Caleb Date: Tue, 29 Sep 2020 14:42:02 -0400 Subject: [PATCH] Removed loggin and reverted changes to webpack --- .../Api/Client/Servers/NetworkAllocationController.php | 8 +------- webpack.config.js | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php index 341d4e926..6fcad7750 100644 --- a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php +++ b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php @@ -136,14 +136,10 @@ class NetworkAllocationController extends ClientApiController */ public function addNew(NewAllocationRequest $request, Server $server): array { - Log::info('addNew()'); $topRange = config('pterodactyl.allocation.stop',0); $bottomRange = config('pterodactyl.allocation.start',0); - Log::error($bottomRange); - Log::error($topRange); if($server->allocation_limit <= $server->allocations->count()) { - Log::error('You have created the maximum number of allocations!'); throw new DisplayException( 'You have created the maximum number of allocations!' ); @@ -153,17 +149,15 @@ class NetworkAllocationController extends ClientApiController if(!$allocation) { if($server->node->allocations()->where('ip',$server->allocation->ip)->where([['port', '>=', $bottomRange ], ['port', '<=', $topRange],])->count() >= $topRange-$bottomRange+1 || !config('allocation.enabled', false)) { - Log::error('No allocations available!'); throw new DisplayException( 'No more allocations available!' ); } - Log::info('Creating new allocation...'); + $allPorts = $server->node->allocations()->select(['port'])->where('ip',$server->allocation->ip)->get()->pluck('port')->toArray(); do { $port = rand($bottomRange, $topRange); - Log::info('Picking port....'); } while(array_search($port, $allPorts)); $this->assignmentService->handle($server->node,[ diff --git a/webpack.config.js b/webpack.config.js index c6d38c211..492c74bf9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -112,7 +112,7 @@ module.exports = { contentBase: path.join(__dirname, '/public'), publicPath: (process.env.PUBLIC_PATH || '') + '/assets/', allowedHosts: [ - 'pterodactyl.test', + '.pterodactyl.test', ], headers: { 'Access-Control-Allow-Origin': '*',