Removed loggin and reverted changes to webpack
This commit is contained in:
parent
0017ab5397
commit
4770af453b
2 changed files with 2 additions and 8 deletions
|
@ -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,[
|
||||
|
|
|
@ -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': '*',
|
||||
|
|
Loading…
Reference in a new issue